SmartLabelsMode: can it target MajorTickInterval please?

2 posts, 0 answers
  1. Sam
    Sam avatar
    67 posts
    Member since:
    Jun 2011

    Posted 29 Oct 2015 Link to this post

    Hi there, we've been playing around with the Smart Labels feature that was recently added to Silverlight UI.

    We actually implemented our own solution (with a lot of help from Telerik) a while ago that does the same thing, so it's been interesting to compare the results of both.

    What we've noticed is that the solution for LinearAxis works pretty much identical to our own, but the solution for CategoricalAxis (including DateTimeCategoricalAxis) has some flaws, in our opinion.

    The major flaw is that the Telerik solution only seems to target the LabelStep property, whereas our solution targets the MajorTickInterval property. The result is that if you have a LOT of categories, the labels don't overlap but the chart plot area is still a mess of grid lines. 

    Would it be possible to have an option that allows us to choose whether MajorTickInterval or LabelStep is updated for Smart Labels on CategoricalAxis? If this is already possible then I'd love to know how.

    It would also be very useful to be able to simulate margins on labels so that whitespace is taken into consideration when determining overlap between labels - we added this ourselves as it wasn't enough just to measure the text of the labels on the axis.


  2. Petar Marchev
    Petar Marchev avatar
    968 posts

    Posted 02 Nov 2015 Link to this post

    Hello Sam,

    During development we dismissed the option of the categorical axis changing the tick interval and we decided to go with it changing the label interval only. This decision was related to more than one reason, but it was mainly due to the way the axis chooses its right margin - if the SmartLabelsMode changes the tick interval, in many cases the last label ended up getting clipped and unreadable.

    However, you do have a point that in some cases there may be too many ticks and make the chart ugly. And it is true that the developer should be able to consider both modes. This is why I logged this in our feedback portal where you can vote and track its status. I also updated your Telerik points as a thank you for this suggestion.

    I was unable to understand the question about the margins of the labels. When the smart labels mode is on, the axis measures the labels along with their Margin (which is set by default via a style). Please explain in little more details what you mean, so that we can assist you with this.

    Petar Marchev
    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 R3 2016 release webinar banner
Back to Top