How can you make StepLabelLevelCount & LabelRotationAngle Dynamic?

5 posts, 1 answers
  1. Rodney Foley
    Rodney Foley avatar
    72 posts
    Member since:
    Oct 2009

    Posted 09 Nov 2010 Link to this post

    It seems it would be very useful if the Chart dynamically would set the StepLabelLevelCount and LabelRotationAngle based on the labels overlapping with each other. For example StepLabelLevelCount could go between 1 and 3 to as label collisions occur, and then after it reaches 3 and it still has collisions it can switch to LabelRotationAngel of 90. That would cover a large majority of cases I would think, and the max step level could be even provided to set how high it steps before resorting to rotation.

    This seems best to be inside the chart itself and just exposed as properties.  However if there is a way to get access to these labels before they are rendered and be able to calculate there expect size and then set the stepping and/or rotation accordingly I don't mind doing that.

    In case you are wondering why I would do this, for some of my charts I have very short labels for my AxisX usually just a date (MM/dd/yyyy), and the charts are dynamic based on the filters a user applies so if they are only looking at a few days and I set the rotation to 90 it doesn't look good with all the white space, it looks better at a step of 1, but as soon as you start increasing the number of days they start colliding quickly

    Kind Regards,
    -Rodney
  2. Answer
    Yavor
    Admin
    Yavor avatar
    11 posts

    Posted 12 Nov 2010 Link to this post

    Hello Rodney,

    At present, the required functionality can be achieved by using code. This behavior, however, cannot be handled by the control automatically, at present. I will pass this suggestion to our developers, who will consider its feasibility, as well as possible ways to implement it for one of the upcoming versions of the control. For the time being, you can dynamically set the rotation angle via the designated property.

    Greetings,
    Yavor
    the Telerik team
    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 Public Issue Tracking system and vote to affect the priority of the items
  3. Rodney Foley
    Rodney Foley avatar
    72 posts
    Member since:
    Oct 2009

    Posted 12 Nov 2010 Link to this post

    Hi Yavor,

    Thanks and that is what I figured.  Was hopping I was missing something.  I appreciate you passing the feature request on to the team, and I will look forward to see if they think it feasible and if they implement it.

    Kind Regards,

    -Rodney
  4. Rahul
    Rahul avatar
    1 posts
    Member since:
    Jan 2012

    Posted 05 Jan 2012 Link to this post

    Is this problem solved now?

    Thanks,
    Rahul Techie.
  5. Yavor
    Admin
    Yavor avatar
    11 posts

    Posted 05 Jan 2012 Link to this post

    Hi,

    The initial suggestion has not been implemented at present. The reason for this is that it is a little beyond the scope of the control to check the data itself, in addition to the fact that one could take steps to manually check the values and either rotate the labels, or truncate the text.

    Greetings,
    Yavor
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top