Error when clicking on Chart

Error when clicking on Chart

My Flutter app has an error when I clicked on the chart:

Line 469 of package:syncfusion_flutter_charts/src/chart/user_interaction/trackball.dart

} else if (trackballBehaviorRenderer._trackballTemplate != null) {
final GlobalKey key =
trackballBehaviorRenderer._trackballTemplate!.key as GlobalKey;
final _TrackballTemplateState? trackballTemplateState =
key.currentState as _TrackballTemplateState;
final double duration =
shouldAlwaysShow || (hideDelay == 0 && chartState._enableDoubleTap)
? 200
: hideDelay;
trackballTemplateState?._trackballTimer =
Timer(Duration(milliseconds: duration.toInt()), () {
trackballTemplateState.hideTrackballTemplate();
});


Error is:

type 'Null' is not a subtype of type '_TrackballTemplateState' in type cast






1 Reply 1 reply marked as answer

SK Sriram Kiran Senthilkumar Syncfusion Team August 27, 2021 09:17 AM UTC

Hi Peter, 
  
Greetings from Syncfusion. We have analyzed your scenario at our end, and we have created a simple chart sample with trackball tooltip template feature enabled to test the reported issue at our end. Unfortunately, we are not able to replicate the reported issue so we kindly request you to share us with more information in detail regarding the trackball template structure you have used in your project along with the replication procedure or if possible, try to replicate the reported issue in the below-attached test sample so that it will help in further analysis to provide the solutions sooner. 
  
Regards, 
Sriram Kiran. 


Marked as answer
Loader.
Up arrow icon