Hi,
I'm working with StackedColumnSeries.
I have a chart that show data by setting visiblemaximum and enabling Panning of the chart, so that the user can scroll to see other x-range. However, I am getting an error (not always, but sometimes) when I start to scroll through the data. Here is the error message I am getting:
It seems like that I am getting the error when the chart gets drawed, but I cannot discover where the error is happening. The error doesn't appear always, but does sometimes appear when I load data from different dates through api call. Here is my SfCartesianChart widget:
SfCartesianChart(
zoomPanBehavior: ZoomPanBehavior(enablePanning: true,),
plotAreaBorderWidth: 0,
primaryXAxis: CategoryAxis(
axisLine: AxisLine(width: 0),
majorGridLines: MajorGridLines(width: 0),
majorTickLines: MajorTickLines(size: 0),
visibleMaximum: data_first == null ? 0.0 : (data_first.getData().length > 8 ? 8 : data_first.getData().length.toDouble()),
),
primaryYAxis: NumericAxis(
rangePadding: ChartRangePadding.none,
isVisible: false,
),
trackballBehavior: TrackballBehavior(
activationMode: ActivationMode.singleTap,
tooltipDisplayMode: TrackballDisplayMode.groupAllPoints,
enable: true,
tooltipSettings: InteractiveTooltip(
enable: true,
),
),
legend: Legend(
textStyle: TextStyle(
fontSize: resWidth(11),
),
position: LegendPosition.bottom,
overflowMode: LegendItemOverflowMode.wrap,
isVisible: true,
),
series: <CartesianSeries>[
(List of Series),
]
)
The intended view for the chart (and the view where error does not appear):
but for different dates with different data, the graph is not getting rendered and I am getting this error everytime I scroll through the graph. As you see from the gif attached, when I load data of Jun 28 and start scrolling, the error pops up (you can see that the chart does not get loaded after the error) and keeps getting error for different dates.
Thank you.
Hi Jaehwi,
Thanks for being patience. We are glad to inform you that the reported issue got fixed in the latest version of the charts. Now, the exception does not throw on panning, and to resolve this kindly upgrade charts to the latest version from the below link.
Latest version: https://pub.dev/packages/syncfusion_flutter_charts/versions/19.2.46
Thanks,
Dharanitharan. P