Crosshair labels for multiple axes?

2 posts, 0 answers
  1. David
    David avatar
    3 posts
    Member since:
    Apr 2013

    Posted 28 Aug 2015 Link to this post

    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.

  2. Martin Ivanov
    Martin Ivanov avatar
    1452 posts

    Posted 01 Sep 2015 Link to this post

    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.

    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
Back to Top