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

Rounding off axis range

1 Answer 49 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Fahad
Top achievements
Rank 1
Fahad asked on 24 Aug 2011, 12:12 PM
Hi,

I have a list of objects that has MaxValue = 680334468, MinValue = -680334468, I need to set a custom range on my axis to show rounded off value. Right now my axis is shown like this,

http://dl.dropbox.com/u/23500975/Telerik/chartaxis.png

I have a step value of 27213378 (MaxValue / (half of objects list)). I tried to round off the axis as,

max = ceil( maxValue / 500000 ) * 500000
min = ceil( minValue / 500000 ) * 500000
step = 500000

I'm assuming the chart will render if the axis is bigger than the data, and it gives me this axis results as,

http://dl.dropbox.com/u/23500975/Telerik/chartaxis2.png

I would like to know how to round-off my cusotm axis range to  properly visualize it. Please let me know any sample / code to do this.

-Fahad

1 Answer, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 29 Aug 2011, 11:57 AM
Hi Fahad,

Indeed there is an issue when rounding off such large numbers and the axis range may not be properly calculated in scenarios like this one. The issue has been logged for our developers to investigate further and provide a fix for one of the upcoming versions of the control.

Regards,
Nikolay
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Tags
Chart
Asked by
Fahad
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Share this question
or