RadCartesianChart axis

2 posts, 0 answers
  1. Jorn
    Jorn avatar
    222 posts
    Member since:
    Jun 2009

    Posted 24 Nov 2015 Link to this post

    See attached screenshot. 

    I have a chart where the both axis have minimum value 1 and maximum value 5. All data points are within this range on both axis. I don't want the data point labels to be "squished" in the edges when they have minimum/maximum values. Sometimes (even with smart labels) the data point labels overlap (bug in the control). So my idea was to "virtualize" the chart's minimum/maximum axis values so that the available plot area was enhanced. In the attached screen shot I have set the minimum/maximum axis to 1 and 6 and all the data points are within 1 to 5 (red area). So far so good, but to minimize the wasted space I'm trying to set the minimum/maximum to -0.5 and 0.5. However the axis labels then gets decimals on them 0,5 - 1,5 and so on even if the MajorStep, MajorInterval etc. are set to 1 (and I'm hiding the first/last label via LabelOffset and LastLabelVisibility). I want the labels to be 1-5. Can this be achieved and if so, how?

  2. Ivan
    Admin
    Ivan avatar
    44 posts

    Posted 26 Nov 2015 Link to this post

    Hi Jorn,

    There is a way to display only the integer values on your axes labels. In your setup this can be achieved by setting the TickOrigin property to 0:
    <telerik:LinearAxis Minimum="0.5"
                Maximum="6.5"
                MajorStep="1"
                TickOrigin="0" />

    Please find further information about it in the Axis help article.

    Let us know if you have any further questions about this case.

    Regards,
    Ivan
    Telerik
    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. DevCraft banner
Back to Top