This is a migrated thread and some comments may be shown as answers.

Crosshair labels for multiple axes?

1 Answer 133 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 28 Aug 2015, 12:38 PM

Does the Cartesian chart support multiple labels for the crosshairs? What I am looking for is a label for all of the axes in the chart. I have a chart with 3 y-axes and the potential for 2 x-axes. I have been asked to provide crosshair labels for all 4-5 of the axes. Is there a way to do this?

Thank you.

1 Answer, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 01 Sep 2015, 07:46 AM
Hello David,

The chart doesn't support crosshair that display information for multiple axes. The crosshair behavior is designed to work only with the main vertical and horizontal axes of the chart. However, you can achieve your requirement by using the chart's annotations and Conversion API. Note that the ConvertPointToData() method has an overload that takes the axes which should be used in the conversion calculations.

For your convenience I am attaching a sample project demonstrating this approach. Keep in mind this is entirely custom behavior which is implemented only as a proof of concept and it is not well tested. The approach is merely a suggestion for implementation of the desired effect about which I cannot guarantee that it will work in all expected cases so I suggest you to only use it as a reference for your own logic.

I hope this helps.

Regards,
Martin
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
ChartView
Asked by
David
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Share this question
or