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

RadCartesianChart-How to always show max values y-axis values?

1 Answer 483 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Denin
Top achievements
Rank 1
Veteran
Denin asked on 28 Jul 2020, 03:41 PM

I have a RadCartesianChart that I am dynamically adding linear series to. I set the minimum and maximum for the y-axis but sometimes it doesn't show a tick for the maximum value at the top of the y-axis. How can I get the graph to always display a tick for the maximum value?

Thanks

1 Answer, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 31 Jul 2020, 12:58 PM

Hello Tyson,

In some cases the step between the ticks is such that there is not enough range to draw the last tick. For example, if you have a minimum of 0, maximum of 6 and a step of 4, you will get ticks on 0 and 4 only. This is because the next ticks should be on 8, but because the range goes only to 6, there is no next tick. 

To achieve your requirement you will need to ensure a step that is multiple of the axis range. For example, if the range is between 0 and 6, you can manually set the step to 1, 2, 3, etc. In other words to a number that will allow you to show the last label. Something like this:

<telerik:LinearAxis Minimum="0" Maximum="6" MajorStep="2"/>

In this example, the MajorStep of 2 will generate ticks on 0, 2, 4 and the maximum 6.

I hope this helps.

Regards,
Martin Ivanov
Progress Telerik

Tags
Chart
Asked by
Denin
Top achievements
Rank 1
Veteran
Answers by
Martin Ivanov
Telerik team
Share this question
or