Back to Devexpress

DxChartAxis<T>.Alignment Property

blazor-devexpress-dot-blazor-dot-dxchartaxis-1-49bbe713.md

latest2.6 KB
Original Source

DxChartAxis<T>.Alignment Property

Specifies the pane edge next to which to place an axis.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
[Parameter]
public ChartAxisAlignment Alignment { get; set; }

Property Value

TypeDescription
ChartAxisAlignment

A ChartAxisAlignment enumeration value.

|

Available values:

NameDescription
Near

The Chart displays an axis next to the left or bottom edge of the pane.

| | Far |

The Chart displays an axis next to the right or top edge of the pane.

|

Remarks

Use the Alignment property to define a pane edge next to which to display an axis. The edge choice depends on the axis Alignment and the Chart’s Rotated property values. The following table shows how axes map their Alignment property values to pane edges if the Rotated property is not specified or set to false:

AxisNearFar
ArgumentBottomTop
ValueLeftRight

If the Rotated property is set to true, the Chart swaps its axes:

AxisNearFar
ArgumentLeftRight
ValueBottomTop

The following example displays the value axis at the right edge of the pane:

razor
<DxChart Data="@dataSource">
    <DxChartTitle Text="Sales Amount" />
    <DxChartLegend Position="RelativePosition.Outside" VerticalAlignment="VerticalEdge.Bottom" />
    <DxChartBarSeries Name="2018"
                      Filter="@((SaleInfo s) => s.Date.Year == 2018)"
                      SummaryMethod="Enumerable.Sum"
                      ArgumentField="@(s => s.City)"
                      ValueField="@(s => s.Amount)" />
    <DxChartBarSeries Name="2019"
                      Filter="@((SaleInfo s) => s.Date.Year == 2019)"
                      SummaryMethod="Enumerable.Sum"
                      ArgumentField="@(s => s.City)"
                      ValueField="@(s => s.Amount)" />
    <DxChartValueAxis Alignment="ChartAxisAlignment.Far" />
</DxChart>

See Also

DxChartAxis<T> Class

DxChartAxis<T> Members

DevExpress.Blazor Namespace