BoldSign®Effortlessly integrate e-signatures into your app with the BoldSign® API. Create a sandbox account!
Hi
I am recording Live data and displaying the data Live on the chart.
New data gets added to the FastLineSeries every 5 seconds.
So, what I did was to call setState() every 5 seconds and the whole chart blinks/flashes as it re-draw the first data to the last data. Maybe it has to do with the animation or timing? But can I have the chart showing the series and add new points without the whole screen blinking?
Hope to hear from you soon.
I tried calling the function but I get the following error:
════════ Exception caught by rendering library ═════════════════════════════════
The data points should be available to render fast line series.
'package:syncfusion_flutter_charts/src/chart/series_painter/fastline_painter.dart':
package:syncfusion_flutter_charts/…/series_painter/fastline_painter.dart:1
Failed assertion: line 188 pos 14: 'seriesPoints.isNotEmpty'
The relevant error-causing widget was
SfCartesianChart
Another exception was thrown: The data points should be available to render fast line series.
The following RenderObject was being processed when the exception was fired: RenderCustomPaint#3c13a relayoutBoundary=up2:
creator: CustomPaint ← RepaintBoundary ← Container ← Stack ← Container ← DecoratedBox ← Container ←
DecoratedBox ← ConstrainedBox ← Container ← Listener ← _GestureSemantics ← ⋯
parentData: <none> (can use size)
constraints: BoxConstraints(0.0<=w<=1017.9, 0.0<=h<=499.0)
size: Size(0.0, 0.0)
This RenderObject has no descendants.
Any hints?
Ok, I resolve this as I was not doing it correctly.
How did you solve this problem, I also encountered the same problem.
In the FastLineSeries it will remove the closest data points from the data source and render a series. So when using the FastLineSeries the data source list must be not empty, at least you have one data item otherwise it will through an assertion error.