How to set trackball in the middle of months?

Hi, I'm implementing SfCartesianChart in my app, added scroll trackball behavior with ScrollController & it is working perfectly fine.

In the demo linked here, when the user scrolls the list to a particular item of the list, the trackball is scrolling to the item of the list as well. Currently, trackball is jumping straight to the month. I want the following behavior of trackball:

When the user scrolls the list to 15 Jun 2023, trackball should be between Jun & July.
OR, When the user scrolls the list to 15 May 2023, trackball should be between May & Apr.



The code for scroll listener and trackball behavior is attached below. Kindly reply asap.

Regards,

Arjun Mahar


Attachment: graph_controller.dart_89f7baf9.zip

2 Replies

AM Arjun mahar July 12, 2023 03:29 AM UTC

Kindly reply asap



HK Hariharasudhan Kanagaraj Syncfusion Team July 12, 2023 12:37 PM UTC

Hi Arjun mahar,


In SfCartesianChart, the trackball feature displays the tooltip for the data points that are closer to the point where you touch on the chart area. Here the trackball cannot render between the two months as per your requirement because the trackball renders based on the data points given.


However, if you need to render the trackball and the axis labels between the ticks, you can achieve this using the labelPlacement property which is applicable only for the DateTimeCategoryAxis and the CategoryAxis.


If you have further query, please get back to us.


Regards,

Hari Hara Sudhan. K


Loader.
Up arrow icon