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

Extra interval on X-axis

I generated a simple column graph using ChartWizard to reproduce the issue. I've input two sets of data with the same X interval, as seen from the diagram there's an extra column towards the end of X-axis. (Instead of stopping at 120, it is stopping at 140 on the x-axis). Is there a way to detect such additional space without manually setting the MinMaxInfo?  


1 Reply

MD Moneeshram Dhanabal Syncfusion Team October 11, 2022 11:03 AM

Hi Alison Tan,


Query: Is there a way to detect such additional space without manually setting the MinMaxInfo? 


We we would like to inform you that, by default the axis RangePaddingType is set as Calculate and the nice range interval calculated based on the series data points will be added to the minimum and maximum of the axis range. You can remove the extra range in axis by setting the axis RangePaddingType value as None as per in the below code example.


this.chartControl1.PrimaryXAxis.ValueType = ChartValueType.Double;

this.chartControl1.PrimaryXAxis.RangePaddingType = ChartAxisRangePaddingType.None;


Please refer the below link for more details.

https://help.syncfusion.com/windowsforms/chart/chart-axes#rangepaddingtypes

https://help.syncfusion.com/windowsforms/chart/chart-axes#axis-range-and-intervals


Please check and let us know if you need any further assistance.


Regards,

Moneeshram D


Loader.
Live Chat Icon For mobile
Up arrow icon