-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When pressing the LineChart, and change the data of the chart, will throw a RangeError #1187
Comments
Fixed in 0.60.0. Please check it out. |
Hello @imaNNeo void badgeWidgetPaint(PaintingContext context, Offset offset) {
RenderObject? child = firstChild;
var counter = 0;
while (child != null) {
final childParentData = child.parentData! as MultiChildLayoutParentData;
if (data.sections[counter].value > 0) {
context.paintChild(child, childParentData.offset + offset);
}
child = childParentData.nextSibling;
counter++;
}
} |
Describe the bug
Hello, we encountered a problem in the process of developing requirements. We use the LineChart to show some data, but the length of the data is not sure. If user press the chart, it will show a bubble. But if the user switch the data source while pressing the chart, it will throw a RangeError, if the new data shorter than the old data.
Just like the samle2. If I add a Spot, just like
FlSpot(12, 3.44)
, to theavgData
. And setavgData
tolineTouchData: LineTouchData(enabled: true)
.Then I switch avg to main while I pressing the last spot of avgData. Then it will has a RangeError.To Reproduce
Versions
I'm in FlChart 0.55.2.
Looking forward to your reply。
The text was updated successfully, but these errors were encountered: