xaxis on column chart overlaps when value exceeds certain number

4 posts, 1 answers
  1. Naureen
    Naureen avatar
    17 posts
    Member since:
    Oct 2016

    Posted 12 May 2017 Link to this post

    I have a simple chart with a line and a bar series. X-axis on the chart represents number of days - Depending on user selection the days can vary from 20 days to 90 days. As soon as number of days starts growing, for instance more than 25 days, the label starts crowding and overlapping each-other. My x-axis is a category axis. How can i adjust increments on x-axis so that it automatically sets certain interval on x-axis to avoid overlapping. Please have a look at attached chart for better explanation of the problem. 
  2. Katia
    Admin
    Katia avatar
    693 posts

    Posted 15 May 2017 Link to this post

    Hello Naureen,

    One option is to control the Axis label with CategoryGroup.Label property which accepts expressions.

    Another option is to switch to Numerical or DateTime scale (How to: Change the Axis Scale) where you will be able to control the labels with LabelStep (LabelUnit) properties (Axis Validation).


    Regards,
    Katia
    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. Naureen
    Naureen avatar
    17 posts
    Member since:
    Oct 2016

    Posted 15 May 2017 in reply to Katia Link to this post

    Thanks for the reply - Second option worked for me but can i set auto increment to 1 if the axis has values <= 20?
  4. Answer
    Katia
    Admin
    Katia avatar
    693 posts

    Posted 17 May 2017 Link to this post

    Hi Naureen,

    You can add a binding for LabelStep and LabelUnit properties into Bindings collection of the coordinate system.

    A sample approach how to change the properties of the Graph item with bindigns is provided in How to: Use Bindings to Control the Coordinate System Properties help article.

    Regards,
    Katia
    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