Skip to main content

Range.SideMarginsValue Property

Specifies the space between the outermost series point and the diagram’s edge.

Namespace: DevExpress.XtraCharts

Assembly: DevExpress.XtraCharts.v24.1.dll

NuGet Package: DevExpress.Charts

Declaration

[NonTestableProperty]
[XtraSerializableProperty]
public double SideMarginsValue { get; set; }

Property Value

Type Description
Double

The side margins value, in the axis’ current measurement unit.

Remarks

The SideMarginsValue property allows you to specify the space between the outermost series points and the diagram’s edge. You can access the SideMarginsValue property via an axis’s WholeRange and VisualRange properties.

Property Value Example
WholeRange.SideMarginsValue = 200
WholeRange.SideMarginsValue = 0

When you use the SideMarginsValue property to specify side margins, this resets the Range.AutoSideMargins property.

The SideMarginsValue property value is measured in axis measurement units.

AxisBase‘s DateTimeScaleOptions.MeasureUnit property specifies the current measurement unit for an axis that measures date-time values. The current measurement unit is DateTimeMeasureUnit.Millisecond for the date-time axis whose mode (AxisBase‘s DateTimeScaleOptions.ScaleMode) is ScaleMode.Continuous. The default measurement unit is Day for other scale modes.

AxisBase‘s NumericScaleOptions.MeasureUnit property specifies the current measurement unit for an axis that measures numeric values. The default measurement unit is NumericMeasureUnit.Ones for the numeric axis.

AxisBase‘s TimeSpanScaleOptions.MeasureUnit property specifies the current measurement unit for an axis that measures time-span values. The current measurement unit is TimeSpanMeasureUnit.Millisecond for the time-span axis whose mode (AxisBase‘s TimeSpanScaleOptions.ScaleMode) is ScaleMode.Continuous. The default measurement unit is Second for other scale modes.

Refer to Visual Ranges and Whole Ranges for more information about ranges.

Example:

The following code removes side margins.

XYDiagram diagram = chartControl1.Diagram as XYDiagram;
diagram.AxisX.WholeRange.SideMarginsValue = 0;

The following code snippets (auto-collected from DevExpress Examples) contain references to the SideMarginsValue property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also