This is a migrated thread and some comments may be shown as answers.

RadCartesianChart axis

1 Answer 45 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Trude
Top achievements
Rank 2
Trude asked on 24 Nov 2015, 10:07 PM

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?

1 Answer, 1 is accepted

Sort by
0
Ivan
Telerik team
answered on 26 Nov 2015, 03:50 PM
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

Tags
ChartView
Asked by
Trude
Top achievements
Rank 2
Answers by
Ivan
Telerik team
Share this question
or