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

Change minimum value for Y-Axis

2 Answers 87 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Stefan Willebrand
Top achievements
Rank 1
Stefan Willebrand asked on 16 Jan 2009, 11:17 AM
How can I change the minimum value for the Y-Axis when loading data dynamically from a database? I have tried the following code in ItemDataBound but no joy:

If

 

e.SeriesItem.YValue < e.ChartSeries.PlotArea.YAxis.MinValue Then

 

e.ChartSeries.PlotArea.YAxis.MinValue = e.SeriesItem.YValue

 

End If

 

2 Answers, 1 is accepted

Sort by
0
Stefan Willebrand
Top achievements
Rank 1
answered on 16 Jan 2009, 11:27 AM
This was now fixed by setting the initial minimum value artificially high and setting autoscale="false" for the yaxis.
0
Ves
Telerik team
answered on 19 Jan 2009, 10:08 AM
Hello Stefan,

Indeed, you will need to set AutoScale property to false in order to manipulate the axis settings - MinValue, MaxValue, Step. Still, if you only need to narrow down the range (i.e. not to start from 0) you can leave AutoScale set to true but set IsZeroBased property to false.

Regards,
Ves
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Chart (Obsolete)
Asked by
Stefan Willebrand
Top achievements
Rank 1
Answers by
Stefan Willebrand
Top achievements
Rank 1
Ves
Telerik team
Share this question
or