I am trying to add another line in the time series chart. And currently I did not find anyway to do this. I am using chart_flutter
dependencies.
Here is my chart code look like:
charts.TimeSeriesChart(
series,
animate: true,
defaultRenderer: charts.LineRendererConfig(
includeArea: true,
includeLine: true,
),
dateTimeFactory: const charts.LocalDateTimeFactory(),
behaviors: [
charts.PanAndZoomBehavior(),
charts.SeriesLegend(
position: charts.BehaviorPosition.top,
horizontalFirst: false,
cellPadding: EdgeInsets.only(left: 80, top: 10, bottom: 4.0),
),
charts.SelectNearest(
eventTrigger: charts.SelectionTrigger.tap
),
charts.LinePointHighlighter(
symbolRenderer: CustomCircleSymbolRenderer(size: size),
),
],
selectionModels: [
charts.SelectionModelConfig(
type: charts.SelectionModelType.info,
changedListener: (charts.SelectionModel model) {
if(model.hasDatumSelection) {
final tankVolumeValue = model.selectedSeries[0].measureFn(model.selectedDatum[0].index).round();
final dateValue = model.selectedSeries[0].domainFn(model.selectedDatum[0].index);
CustomCircleSymbolRenderer.value = '$dateValue
$tankVolumeValue';
}
})
]),
Any idea on how to add another line is welcome.
question from:https://stackoverflow.com/questions/65660927/how-to-add-many-line-in-time-series-chart-in-flutter