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

Custom format or content of labels shown besides the TrackBallInfo

Hello,

I am struggling big time with TrackBallInfo.
I want to achieve, what seems to be a very simple thing:
I have a numerical Y-axis, which I configured this way:

<chart:SfChart.SecondaryAxis>
    <chart:NumericalAxis EdgeLabelsVisibilityMode="Default"
                                       EdgeLabelsDrawingMode="Hide"
                                       Minimum="{Binding Path=MinimumY}"
                                       Maximum="{Binding Path=MaximumY}"
                                       LabelFormat="0.00" 
                                       FontSize="12"
                                       ShowTrackBallInfo="True"/>
</chart:SfChart.SecondaryAxis>


Now, I want the TrackBallInfo not to contain the Y-Value in the format that is shown on the Y-axis, but I would like to format it in the way, that I decide, or rather configure in my config file.
So to say, I want to be able to change it to scientific format, or 7-digit precision, or some text (e.g.: GOOD, BAD, SUPER, DANGER, ... whatever, you got the point, right?).

How can I achieve this?

I mean, If I set the format in LabelFormat for the axis, it is fine in the TrackBallInfos, but wrong on the Y-Axis labels, where I only need to show 2 decimal points.

Thanks for your help!

P. Filip

1 Reply

SJ Sumathi Jayaraj Syncfusion Team January 25, 2016 11:42 AM UTC

Hi Pavel,

Thanks for contacting Syncfusion support.

We are able to achieve your requirement with label format configuration and to select which axis label need to display in the trackball info, by defining CustomTrackBallBehavior. We have prepared a sample to achieve your requirements and please find the sample in the following location.

Sample: TrackBallInfos


Regards,
Sumathi J

Loader.
Up arrow icon