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

y axis fractional values

1 Answer 60 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Melody
Top achievements
Rank 1
Melody asked on 19 Oct 2010, 06:29 PM
On the y axis of my bar chart I have Number of Households.  Obviously, this number is always an integer but I am sometimes getting the following on the y axis:  0, 0.5, 1, 1.5, 2, 2.5, etc.

The plot is coming out correctly.  The x axis shows dates and the plot is usage by y-number of households on a given date.

How can I force the y axis to show only integers?


Thanks.

1 Answer, 1 is accepted

Sort by
0
Evgenia
Telerik team
answered on 21 Oct 2010, 03:49 PM
Hi Melody,

You can change the chart's range so that it has integer Step (for example the step is 1). You can achieve this by turning off AutoScale property and set the X axis range manually: 
 
RadChart1.PlotArea.YAxis.AutoScale = false;
RadChart1.PlotArea.YAxis.AddRange(0,7,1);

This is described in our help topic - http://www.telerik.com/help/aspnet-ajax/understandingelementsaxes.html.

All the best,
Evgenia
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
Tags
Chart (Obsolete)
Asked by
Melody
Top achievements
Rank 1
Answers by
Evgenia
Telerik team
Share this question
or