Offset argument contained a NaN value, happens when maxPrice and minPrice are equal
'dart:ui/painting.dart':
Failed assertion: line 52 pos 10: '<optimized out>'
ig this happens when maxPrice and minPrice are the same in a set of data. this happens in fitPrice function
double fitPrice(double y) =>
priceHeight * (maxPrice - y) / (maxPrice - minPrice);
and thanks for the amazing package!
'dart:ui/painting.dart': Failed assertion: line 52 pos 10: '<optimized out>'ig this happens when maxPrice and minPrice are the same in a set of data. this happens in fitPrice function
double fitPrice(double y) => priceHeight * (maxPrice - y) / (maxPrice - minPrice);and thanks for the amazing package!
I have 2 similar issues to siva2204's.
════════ Exception caught by widgets library ═══════════════════════════════════
Cannot interpolate between finite and non-finite values
'dart:ui/lerp.dart':
Failed assertion: line 20 pos 10: '
The relevant error-causing widget was InteractiveChart lib\…\components\interact_chart.dart:98 ════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by rendering library ═════════════════════════════════
The following assertion was thrown during paint():
Offset argument contained a NaN value.
'dart:ui/painting.dart':
Failed assertion: line 52 pos 10: '
The relevant error-causing widget was
InteractiveChart
lib\…\components\interact_chart.dart:98
When the exception was thrown, this was the stack
#2 _offsetIsValid (dart:ui/painting.dart:52:10)
#3 Canvas.drawLine (dart:ui/painting.dart:4167:12)
#4 ChartPainter._drawPriceGridAndLabels.