RRect argument contained a NaN value error

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.


Attachment: ezgif.comgifmaker.gif_8ddea6af.zip

2 Replies 1 reply marked as answer

DP Dharanitharan Palanisamy Syncfusion Team July 1, 2021 01:20 PM UTC

Hi Jaehwi, 
 
We investigated your case and were able to reproduce the problem at our end. We will include the fix in the next weekly patch, which will be released on July 6, 2021, and we appreciate your patience util then. You may also check the status of your feedback at this link. 
 
 
Thanks, 
Dharanitharan. P 



DP Dharanitharan Palanisamy Syncfusion Team July 7, 2021 04:41 AM UTC

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



Marked as answer
Loader.
Up arrow icon