imaNNeo / fl_chart

FL Chart is a highly customizable Flutter chart library that supports Line Chart, Bar Chart, Pie Chart, Scatter Chart, and Radar Chart.
https://flchart.dev
MIT License
6.87k stars 1.78k forks source link

Axis chart: Unsupported operation: Infinity or NaN toInt #1739

Open mzdm opened 2 months ago

mzdm commented 2 months ago

Describe the bug

Crashed in non-app: double.dart in double.~/
axis_chart_helper.dart in AxisChartHelper.iterateThroughAxis at line 38 within fl_chart
Called from: async_patch.dart in _SyncStarIterator.moveNext
axis_chart_painter.dart in AxisChartPainter.drawGrid at line 117 within fl_chart
axis_chart_painter.dart in AxisChartPainter.paint at line 47 within fl_chart
bar_chart_painter.dart in BarChartPainter.paint at line 52 within fl_chart
bar_chart_renderer.dart in RenderBarChart.paint at line 91 within fl_chart
Called from: object.dart in RenderObject._paintWithContext within flutter

To Reproduce I do not have reproduce sample - this came from Sentry and seems to be internal issue of this package. I found relevent https://github.com/imaNNeo/fl_chart/issues/857.

Versions

Laytongentleman commented 2 months ago

I have a similar issue, UnsupportedError (Unsupported operation: Infinity or NaN toInt) Which happens whenever I put any chart inside a Row or a Column, linechart for example. Maybe mzdm's issue is related to mine.