We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

PrimaryYAxis range


How do I set the range for the PrimaryYAxis? The max value on the Y axis varies depending on the total cost value.

If total cost value is something like $1 million, I want the Y Axis range to be like $0, $200,000.00, $400,000.00, $600,000.00, $800,000.00 and $1 million.
If the total cost value is $10 million, I want the Y axis range to be $0, $2million, $4million, $6million, $8million ad $10 million.
If the total cost value is $500,000.00, I want the Y axis range to be $0, $100,000.00, $200,000.00,$300,000.00,$400,000.00 and $500,000.00 and so forth.
I always want it to start from $0 (minimum).
What properties do I need to use to achieve this output? Please help.

Thanks!

3 Replies

MS Manimala S Syncfusion Team June 25, 2009 12:41 PM UTC

Hi,

We can do this by setting the range for the axis dynamically. I have created a simple sample to do this. Kindly get the sample from the following location.

http://files.syncfusion.com/support/Chart.Web/7.2.0.20/F83425/main.htm

Kindly, let me know if it helps.

Thanks,
Manimala.



NH Niclas Haner May 12, 2010 10:27 AM UTC

I get a server error when trying to access the example. Is this example still available.

Best regards,

Niclas


JB Jaffersathick B Syncfusion Team May 12, 2010 12:13 PM UTC

Hi Niclas,

Thank you for using syncfusion products.

We suggest you to set the Range value of the PrimaryXAxis according to the points maximum value to achieve the same.

Please refer the following code snippet:

[CS]

this.chartControl1.PrimaryXAxis.RangeType = ChartAxisRangeType.Set;
// 0 – starting value.
// 50 – End value.
// 10 - Interval
this.chartControl1.PrimaryXAxis.Range = new MinMaxInfo(0, 50, 10);



Please refer the online sample from the following link:

http://samples.syncfusion.com/ASPNET/8.2.0.18/Web/Chart.Web/samples/3.5/Chart%20Appearance/ChartAppearanceSample/CS/ChartAppearanceSample.aspx?args=1

Please refer the Documentation from the following link:
http://help.syncfusion.com/ug_82/WindowsFormsUI_Chart/AxisValueSystem.html

Let me know if you have any other concerns.

Regards,
Jaffer.B

Loader.
Live Chat Icon For mobile
Up arrow icon