Displaying limited number of labels.

2 posts, 0 answers
  1. Lincoln
    Lincoln avatar
    1 posts
    Member since:
    Sep 2016

    Posted 13 Oct Link to this post

    Hello,

    i'm wondering if it is possible to have only 3 labels at my CategoricalAxis representing first value, middle and last. There is a property callled MajorTicInterval, but that's not what i was looking for. I can get this functionality in other way, by creating 3 labels, but if it'll be possible in Chart, that i'll great.

    Greetings

  2. Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1182 posts

    Posted 17 Oct Link to this post

    Hi Patrick,

    There is no way of doing this automatically. However, there is way to implement the required behavior using our charting component. The key still is using the MajorTickInterval property. The trick is that you will need to calculate its value before visualizing the chart. You know how much points will be visualized and based on that value you should calculate the value of the MajorTickInterval that needs to be set. Our documentation demonstrates this same approach with 5 data points and MajorTickInterval = 2. In your particular scenario you just need to scale this approach. 

    Regards,
    Pavel R. Pavlov
    Telerik by Progress
    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
  3. DevCraft banner
Back to Top