syncfusion / flutter-examples

This repository contains the Syncfusion Flutter UI widgets examples and the guide to use them.
Other
1.98k stars 775 forks source link

trackballBehavior - Dynamically change the color of respective X axis label, when interacting with the chart #870

Closed svscorp closed 1 month ago

svscorp commented 1 month ago

Use case

In this example, is there a way to dynamically "highlight" the X axis label (i.e. if X axis is months "Jan", "Feb", etc...) when interact with the chart?

trackballBehavior: TrackballBehavior(
  enable: true,
  activationMode: ActivationMode.singleTap,
  shouldAlwaysShow: true,
  lineType: TrackballLineType.vertical,
  lineDashArray: [10, 10],
  lineWidth: 1,
  onTrackballPositionChanging: (TrackballArgs args) {
    // how do I access and change color of a currently hovered/touched X axis label?
  },
),

Proposal

Implementing such feature would be useful.

svscorp commented 1 month ago

Figured out.