Skip to content

Latest commit

 

History

History
48 lines (32 loc) · 1.81 KB

File metadata and controls

48 lines (32 loc) · 1.81 KB
layout post
title Axis Range Padding in Windows Forms Chart control | Syncfusion
description Learn about Chart axis padding support in Syncfusion Essential Studio® Windows Forms Chart control and more details.
platform windowsforms
control Chart
documentation ug

Axis Range Padding in Windows Forms Chart

Control padding at the minimum and maximum ends of an axis range to ensure data points are not drawn flush against chart boundaries. Range padding can be disabled or automatically calculated to include an extra interval at both ends.

Customization

  • None — No automatic padding; axis range follows data extents directly
  • Calculate — Adds one interval to the min and max of the axis range so data is inset from the chart edges

{% tabs %} {% highlight c# %}

// Disable automatic range padding chart.PrimaryXAxis.RangePaddingType = ChartAxisRangePaddingType.None;

// Enable calculated padding (adds one interval to min and max) chart.PrimaryXAxis.RangePaddingType = ChartAxisRangePaddingType.Calculate;

{% endhighlight %} {% highlight vb %}

'Disable automatic range padding chart.PrimaryXAxis.RangePaddingType = ChartAxisRangePaddingType.None

'Enable calculated padding (adds one interval to min and max) chart.PrimaryXAxis.RangePaddingType = ChartAxisRangePaddingType.Calculate

{% endhighlight %} {% endtabs %}

  • The following screenshot shows the axis with RangePaddingType = None.

Chart Axes

  • The following screenshot shows the axis with RangePaddingType = Calculate (interval added to extremes).

Chart Axes