Version

Axis Margins

By default, Chart will display data across 100% of its axes, like in the following image:

Shows a 2D Scatter Chart with the data displaying across one hundred percent of its axes.

Axis margins allow the application developer to add spacing on each side of any axis. This can often improve the look and clarity of a chart.

Here is an image of the same chart as above, with a 5% margin added at the Near and Far ends of the X-axis:

Same chart that was shown in the first image

To customize axis margins, use the following properties (where N is the axis being customized):

  • UltraChart.Axis.N.Margins.Near

  • UltraChart.Axis.N.Margins.Far

Margin size can be set using a pixel value, a percentage value, or a data value. Set the MarginType property to the appropriate unit of measurement. The Value property will determine how much space to use for the margin.

Additionally, an editor control is provided which can be used to adjust axis margins. This editor can be found on the axes tab of the chart wizard, or by clicking on the UltraChart.Axis property in the properties grid:

Shows the Axis drop-down that appears in the Visual Studio properties window that allows you to change the axis margins.
Shows a 2D Scatter Chart where the margins have been adjusted using the axis margin editor in Visual Studio.
Note
Note

The editor control will function only for margins for which the MarginType is set to "Pixels" or "Percentage".