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

Missing Zero in Y-Axis range

3 Answers 52 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Madhan
Top achievements
Rank 1
Madhan asked on 14 Sep 2012, 06:35 AM
Hello Team,


We are using RadChart control to show Revenue and Unit graphs.In graph we have two series like VTB and YOY and we are trying to customize the  Y-Axix scale values based on Min and Max values of VTB and YOY .We are able to get Min and Max values of VTB and YOY and set range as below.


ChartArea chartArea = objChartArrayMTD.BarChart.DefaultView.ChartArea;
chartArea.AxisY.AutoRange = true;


MinVal=-56 and MaxVal=50 and Step=25


chartArea.AxisY.AddRange(MinVal, MaxVal, step);


Once we set values like above me are missing 0 in Y-Axis values.Can you please send me solution ASAP?

3 Answers, 1 is accepted

Sort by
0
Sia
Telerik team
answered on 14 Sep 2012, 08:41 AM
Hello Madhan Mamidala,

The problem that you observe occurs because of the value that you set for minimum. RadChart will render y axis with 0 only if the manual range starts from value that is a multiple of the step value.

Kind regards,
Sia
the Telerik team

Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.

0
Madhan
Top achievements
Rank 1
answered on 14 Sep 2012, 08:49 AM
Hello Sia,

Thanks for your reply.Can you please assist me how can i get 0 with that give min=-56 and max=50?
0
Sia
Telerik team
answered on 18 Sep 2012, 11:05 AM
Hi Madhan,

If you have MinValue = -56 and MaxValue = 50, that means that your range is 106 (=2x53). You need to choose 1 or 2 for step in order to have the 0 value displayed on your axis.
Another option is to choose your step value depending on the minimum. For example you can choose Step = 14. But in that case you won't have the maximum value displayed with label.

Kind regards,
Sia
the Telerik team

Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.

Tags
Chart
Asked by
Madhan
Top achievements
Rank 1
Answers by
Sia
Telerik team
Madhan
Top achievements
Rank 1
Share this question
or