Setting the X-Axis step/scale on a Line Graph?

3 posts, 1 answers
  1. NerdBrick
    NerdBrick avatar
    38 posts
    Member since:
    Jan 2013

    Posted 24 Jul 2014 Link to this post

    When using the Line Graph, how can I avoid bunching of labels on the X-Axis. I looked for Step and Scale, but I can't seem to avoid what is happening in the attached image.

    I used this example in the document as a starting point, and the XAxis is a CategoryScale version 2014-Q1.
    http://www.telerik.com/help/reporting/graphhowtocreatelinechart.html 


    Thank you
  2. Answer
    Nasko
    Admin
    Nasko avatar
    1050 posts

    Posted 29 Jul 2014 Link to this post

    Hello Brick,

    The main issue in the described scenario comes from the fact that the X axis width is not enough to fit in all of the axis labels. In order to fix this issue either rotate the labels, or just hide some of them:
    1. You can rotate the labels in order to improve their readability. The label angle is controlled from the GraphAxis.LabelAngle property.
    2. To hide some of the labels you need to first change the Scale type to NumericalScale and set an appropriate data field for the LineSeries.X property. Then you will be able to set the NumericalScale.LabelStep Property and omit some of the X axis labels, which will improve the chart readability.


    Regards,
    Nasko
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. NerdBrick
    NerdBrick avatar
    38 posts
    Member since:
    Jan 2013

    Posted 29 Jul 2014 in reply to Nasko Link to this post

    NumericalScale was the part that brought everything to light. 

    Thank you.
Back to Top