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

Y Axis

how do i get the y axis to start from 0?
all my values are positive, the y axis is automaticly build(its data bounded from dataset), i dont know the maximum value
but it always add one scale below the 0 and i dont want it

thank you


1 Reply

BP Bhuvaneswari P Syncfusion Team May 15, 2008 05:56 AM UTC

Hi Ravit,

Thanks for using Syncfusion Products.

You can able to achieve your requirement using PrimaryYAxis.Min or PrimaryYAxis.ForeZero properties in ChartControl.

Please refer the following code snippet which illustrates how to set PrimaryYAxis minimum value as Zero.


//Set PrimaryYAxis Minimum Range Property.

this.ChartControl1.PrimaryYAxis.RangeType = ChartAxisRangeType.Set;
this.ChartbControl1.PrimaryYAxis.Range.Min = 0;

//Set PrimaryYAxis ForeZero Property.

this.CharControl1.PrimaryYAxis.ForceZero = true;
or

//Set PrimaryYAxis PreferZero Property.
this.CharControl1.PrimaryYAxis.PreferZero= true;



Please let me know if this helps.

Best Regards,
Bhuvana



Loader.
Live Chat Icon For mobile
Up arrow icon