Hiding some labels from the X-axis

Thread is closed for posting
2 posts, 0 answers
  1. Imar
    Imar avatar
    27 posts
    Member since:
    Apr 2007

    Posted 07 Dec 2009 Link to this post

    Hi there,

    I am building a Spline chart that can show data for a potentially large number of dates on the X-Axis (Y-Axis displays a size for each date). A user can choose a start and an end data to determine the scope for the chart. When hundreds of days are chosen, the X-Axis becomes pretty messy as all labels overlap. This brings me to the following question:

    1. How can I limit the number of items in the X-Axis? I tried MaxItemsCount but that doesn't seem to work OK? (and is not documented)

    2. Are there better ways to do this? E.g. instead of hiding labels in the x-axis, maybe I can group the data? In that case, how do I maintain the smooth line of the chart?

    My ultimate goal is to show the chart line for the entire selected period, and only have a small number (say 10) labels. So when I choose 10 years, I roughly get 10 labels for each year. When I choose a month, each entry represents three days.

    If the on-line examples show this behavior (declarative or programmatically), can you please refer me to the correct one?

    Thanks.

    Imar
  2. Vladimir Milev
    Admin
    Vladimir Milev avatar
    1061 posts

    Posted 08 Dec 2009 Link to this post

    Hello Imar,

    I think you are looking for the LabelStep property. Let us know if that's good enough for you.

    Regards,
    Vladimir Milev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top