Hi there,
I had problems with the performance of StackedColumnSeries. Unlike LineSeries, they render very slowly and are lagging. I tested the whole thing with about 120 data points. With LineSeries this was no problem at all, but the ColumnSeries are unusable. Maybe the implementation should be optimized here.
Below is the code how I implemented the chart:
SfCartesianChart(
plotAreaBorderWidth: 0,
primaryXAxis: DateTimeCategoryAxis(
isVisible: true,
majorGridLines: const MajorGridLines(width: 0),
labelRotation: 75,
),
zoomPanBehavior: ZoomPanBehavior(
enablePinching: true,
zoomMode: ZoomMode.x,
enablePanning: true,
enableMouseWheelZooming: false,
),
primaryYAxis: NumericAxis(isVisible: true),
series: data
.map(
(dataPoint) => StackedColumnSeries<DateTimeDataPoint, DateTime>(
name: widget.legends[data.indexOf(dataPoint)],
dataSource: dataPoint,
xValueMapper: (DateTimeDataPoint dataPoint, _) => dataPoint.xPoint,
yValueMapper: (DateTimeDataPoint dataPoint, _) => dataPoint.yPoint,
color: widget.chartColors[data.indexOf(dataPoint)],
),
)
.toList(),
);