Skip to main content

SideMarginSizeUnit Enum

Specifies possible measurement units for diagram side margins.

Namespace: DevExpress.Xpf.Charts

Assembly: DevExpress.Xpf.Charts.v24.2.dll

NuGet Package: DevExpress.Wpf.Charts

Declaration

public enum SideMarginSizeUnit

Members

Name Description
AxisUnit

Side margins are specified in axis measurement units.

AxisRangePercentage

Side margins are specified as a percentage.

Related API Members

The following properties accept/return SideMarginSizeUnit values:

Remarks

SideMarginSizeUnit enumerates possible values for the Range.SideMarginSizeUnit property.

Example

This example demonstrates how to specify diagram side margins as a percentage:

Use the following code to set side margins in markup:

<dxc:ChartControl ... >
    <dxc:XYDiagram2D>
        <dxc:XYDiagram2D.AxisX>
            <dxc:AxisX2D ...>
                <dxc:AxisX2D.WholeRange>
                    <dxc:Range StartSideMargin="20" EndSideMargin="0"
                               SideMarginSizeUnit="AxisRangePercentage"/>
                </dxc:AxisX2D.WholeRange>
            </dxc:AxisX2D>
        </dxc:XYDiagram2D.AxisX>
    </dxc:XYDiagram2D>
    ...
</dxc:ChartControl>

The code below shows how to specify margins at runtime:

Range range = new Range();
xAxis.WholeRange = range;
range.SideMarginSizeUnit = SideMarginSizeUnit.AxisRangePercentage;
range.StartSideMargin = 20;
range.EndSideMargin = 0;

Related API members:

Member

Description

Range.SideMarginSizeUnit

Sets the measurement unit for side margins.

Range.StartSideMargin

Specifies the left margin.

Range.EndSideMargin

Specifies the right margin.

See Also