Reduce number of XAxis labels

Thread is closed for posting
3 posts, 1 answers
  1. Conor
    Conor avatar
    2 posts
    Member since:
    Oct 2008

    Posted 18 Dec 2008 Link to this post

    Hi all,

    I've a chart that displays dates on the x axis and numbers on the y. For example:
    2008-10-10, 5
    2008-10-12, 8
    2008-10-13, 2
    2008-10-14, 8
    2008-10-15, 1
    2008-10-17, 3
    2008-10-18, 10

    There could be 100 items to show, so when displayed the date labels at the bottom of the graph overlap. Is it possible to make the chart to automatically show only a few labels at suitable intervals so that they don't overlap?
  2. Answer
    Ves
    Admin
    Ves avatar
    2926 posts

    Posted 19 Dec 2008 Link to this post

    Hello Conor,

    You can take advantage of the LabelStep property of X axis. Setting it to 5 will force the axis to show each 5-th item and hide the rest of them. You can check the second chart in this online example.

    Kind regards,
    Ves
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. Conor
    Conor avatar
    2 posts
    Member since:
    Oct 2008

    Posted 19 Dec 2008 Link to this post

    Super, thanks.
Back to Top