有了这个图表,我怎样才能添加红线(现在)?
这是我到目前为止所拥有的:
LineChartData(
maxY: maxY + 10 * _onePercentRange,
minY: minY - 10 * _onePercentRange,
titlesData: FlTitlesData(
bottomTitles: SideTitles(
showTitles: true,
margin: 10,
getTitles: (value) {
return getDateBaseInFormatFromJsonString(
dates[value.toInt()], "MM/dd\nHHmm");
},
),
),
borderData: FlBorderData(
show: true,
border: Border(
bottom: BorderSide(
color: currentTheme.primaryColor,
width: 2,
),
left: BorderSide(
color: currentTheme.primaryColor,
width: 2,
),
),
),
lineBarsData: [
LineChartBarData(
spots: spots,
isCurved: true,
colors: [currentTheme.primaryColor],
isStrokeCapRound: true,
dotData: FlDotData(
show: false,
),
),
],
);