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
close icon

Format TrackBall labels

I have multiple (3) graphs in a chart. I'd like to format the trackball label so that it only shows the number up to 2 decimal points. I'd also like to increase the size of the font in the label. Also, is it possible to disable the "mouse over" event to move the TrackBall line and control it programmatically? Thanks!

Attachment: Example_789930b2.zip

5 Replies

DA Devi Aruna Maharasi Murugan Syncfusion Team January 23, 2017 12:26 PM UTC

Hi Sean, 
  
Thanks for contacting Syncfusion Support. 
  
Query 1: Regarding formatting the trackball 
  
We can achieve this requirement (customizing the FontSize) by using the TrackBallLabelTemplate property of chart series and we can round off the label value into 2 decimal digits by binding the label value using converter 
  
Query 2: Regarding controlling the “mouse over” programmatically 
  
You can programmatically control the trackball by using CustomTrackBallBehavior. We can We have prepared a demo sample based on your requirement and it can be downloaded from below link, 
  
  
Regards, 
Devi 





SS Sean Schellinger January 23, 2017 05:00 PM UTC

This solution works, except when I have multiple series that have the same value. Using the default behavior, this would show two labels that are slightly offset. However, with this solution, only the label for the series that is "on top" of the other is shown.


DA Devi Aruna Maharasi Murugan Syncfusion Team January 24, 2017 10:18 AM UTC

Hi Sean, 
  
Thanks for your update. 
  
Currently, we are working on the TrackBall enhancement for grouping the trackball labels of multiple series and displaying it in a single label. It will be included in our Volume 1, 2017 main release which will be available in mid of February 2017. 
  
We appreciate your patience until then. 
  
Regards, 
Devi 



SS Sean Schellinger January 24, 2017 03:04 PM UTC

So there is no way to replicate the "default" label behavior of offsetting the labels when values are equal if you are using a custom label? I also now have the need to make certain labels visible/hidden. I was able to do this with the labels, but not with the TrackBall itself. I know you can modify the trackball style by using ChartTrackBallStyle, but the problem is that this is linked to the entire behavior. In my case, I have multiple series in multiple graphs inside the same SfChart. Is there a way to somehow use a ChartTrackBallStyle on a series basis?


DA Devi Aruna Maharasi Murugan Syncfusion Team January 25, 2017 09:29 AM UTC

Hi Sean, 
  
Thanks for your update. 
  
Query 1: Replicating Default behavior 
  
Yes, we do not replicate the default trackball behavior while setting TrackBallTemplate. We have already considered this as feature enhancement and it will be included in our upcoming Volume 1, 2017 main release. 
  
Query 2: Regarding Visible/Hidden Trackball 
  
We have achieved this requirement with CustomTrackBallBehavior. We have prepared a demo sample based on this requirement and it can be downloaded from below link, 
  
Sample: CustomTrackBall 
  
Regards, 
Devi 




Loader.
Live Chat Icon For mobile
Up arrow icon