Line Chart with 7 data points shows more labels

3 posts, 0 answers
  1. Tim
    Tim avatar
    114 posts
    Member since:
    Aug 2011

    Posted 19 Mar 2012 Link to this post

    Hello telerik!
    I have a super simple chart with 7 data points. Unfortunately the chart looks like the chart visible in the attachment... :(
    What can I do? I only want datapoints/ labels for the data that is actually in the chart --> 7 Labels! :)

    Thanks a lot,
    Tim.
  2. Evgenia
    Admin
    Evgenia avatar
    1407 posts

    Posted 21 Mar 2012 Link to this post

    Hi Tim,

    Dates, displayed in your X-axis, are repeated because you are adding your DateTime objects as X values. This causes the axis to go into strict mode in which the items are drawn from Min to Max using a calculated Step. It seems that in your case this step is some hours (smaller than a single day).

    Try using XCategory as your DataPoint.Member instead of using XValue. More about categorical charts can be found here.

    All the best,
    Evgenia
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. DevCraft banner
  4. Tim
    Tim avatar
    114 posts
    Member since:
    Aug 2011

    Posted 21 Mar 2012 Link to this post

    Hello Evgenia,
    thanks for replying! XCategory suits me fine... :)
    All the best,Tim.
Back to Top