Displaying limited number of labels.

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

    Posted 13 Oct 2016 Link to this post


    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.


  2. Pavel R. Pavlov
    Pavel R. Pavlov avatar
    1251 posts

    Posted 17 Oct 2016 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. 

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