Skip to content
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

Error when data length is 1 #20

Open
hsynaksu opened this issue Apr 29, 2020 · 2 comments
Open

Error when data length is 1 #20

hsynaksu opened this issue Apr 29, 2020 · 2 comments

Comments

@hsynaksu
Copy link

Hi there! Great library

Only issue I have is when length of the data map is only 1, my layout shifts weirdly and I get this error:

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 38: ''

Either the assertion indicates an error in the framework itself, or we should provide substantially more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
https://github.com/flutter/flutter/issues/new?template=BUG.md

The relevant error-causing widget was
AnimatedLineChart-[#5c159]
lib\…\anomaly_tag_screens\wristbands_screen.dart:190
When the exception was thrown, this was the stack
#2 _offsetIsValid (dart:ui/painting.dart:38:10)
#3 Canvas.drawCircle (dart:ui/painting.dart:3643:12)
#4 ChartPainter._drawLines.. (package:fl_animated_linechart/chart/animated_line_chart.dart:351:40)
#5 List.forEach (dart:core-patch/growable_array.dart:285:8)
#6 ChartPainter._drawLines. (package:fl_animated_linechart/chart/animated_line_chart.dart:351:18)
...
The following RenderObject was being processed when the exception was fired: RenderCustomPaint#996d4
RenderObject: RenderCustomPaint#996d4
parentData: (can use size)
constraints: BoxConstraints(w=330.0, h=229.5)
size: Size(330.0, 229.5)

@happyphper
Copy link

+1

@JFreakDK
Copy link
Collaborator

JFreakDK commented Aug 7, 2020

It would be nice if you could create a pull request that handles this case

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants