An exception is thrown when using Trackball in CandleSeries .

======== Exception caught by rendering library =====================================================

The following RangeError was thrown during paint():

RangeError (index): Invalid value: Not in inclusive range 0..44: 46


The relevant error-causing widget was:

  SfCartesianChart file:///Users/user/repos/somnium-labs/smart_coin/lib/view/stock_chart_screen.dart:151:38

When the exception was thrown, this was the stack:

#0 List.[] (dart:core-patch/growable_array.dart:254:60)

#1 _TrackballPainter._renderMarker (package:syncfusion_flutter_charts/src/chart/user_interaction/trackball_painter.dart:1412:36)

#2 _TrackballPainter._drawTooltipMarker (package:syncfusion_flutter_charts/src/chart/user_interaction/trackball_painter.dart:1330:11)

#3 _TrackballPainter._drawRectandText (package:syncfusion_flutter_charts/src/chart/user_interaction/trackball_painter.dart:1102:21)

#4 _TrackballPainter._drawTooltip (package:syncfusion_flutter_charts/src/chart/user_interaction/trackball_painter.dart:919:7)

...

The following RenderObject was being processed when the exception was fired: RenderCustomPaint#68d8b

... parentData: <none> (can use size)

... constraints: BoxConstraints(w=408.0, h=733.0)

... size: Size(408.0, 733.0)

RenderObject: RenderCustomPaint#68d8b

  parentData: <none> (can use size)

  constraints: BoxConstraints(w=408.0, h=733.0)

  size: Size(408.0, 733.0)

====================================================================================================








But,  Just replace CandleSeries with HiloOpenCloseSeries and there is no problem.




1 Reply

DD Dharanidharan Dharmasivam Syncfusion Team August 16, 2021 12:44 PM UTC

Hi David, 
 
Greetings from Syncfusion. We have analyzed on the provided scenario and tried to replicate the scenario with the provided code. Unfortunately, we are unable to replicate and the trackball is working fine at our end. Sample used for testing can be found from below. 
 
 
We have also attached a video of this and can be found below. 
 
Kindly get back to us with more information on which scenario the issue got replicated and try to replicate your scenario with above sample and revert us. This will be helpful in providing the solution earlier. 
 
Thanks, 
Dharani. 


Loader.
Up arrow icon