We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Display trackball

Is it possible to display trackball by double tapping and also hide trackball by double tapping

3 Replies

YG Yuvaraj Gajaraj Syncfusion Team April 5, 2023 10:26 AM UTC

Hi Bar,

You can achieve your requirement with the help of showByIndex and hide public methods in trackball and onPointDoubleTap callback in the series. Here you need to enable the shoulAlwaysShow property and set the activation mode to none in trackball behavior. Then call the showByIndex public method inside the onPointDoubleTap callback if the previous point index is not the same as the current point index from the callback like the wise call the hide method if both the point index is the same. We have shared the code snippet below for your reference.

Code snippet:

late TrackballBehavior _trackballBehavior;

int? pointIndex;

void initState() {
_tooltipBehavior = TooltipBehavior(enable: true);
_trackballBehavior = TrackballBehavior(
enable: true,
shouldAlwaysShow: true,
activationMode: ActivationMode.none,

onPointDoubleTap: (args) {
if (pointIndex == null || pointIndex != args.pointIndex) {
pointIndex = args.pointIndex;
} else if (pointIndex == args.pointIndex) {
pointIndex = null;
// Other required properties






BI Bar Ilan April 9, 2023 04:30 PM UTC

Is it possible to do it on all area of the chart and not only points?

LP Lokesh Palani Syncfusion Team April 10, 2023 08:27 AM UTC

Hi Bar,

Currently, we do not have support to display the trackball on all areas of the chart. You can achieve your requirement with the help of crosshairBehavior. By using crosshairBehavior, you can display the axis values on all areas of the chart and not only on points. We have shared the sample link and related UG Documentation below for your reference.






Lokesh Palani.

Live Chat Icon For mobile
Up arrow icon