Back to Devexpress

DxChartConstantLineLabel.VerticalAlignment Property

blazor-devexpress-dot-blazor-dot-dxchartconstantlinelabel-158b79b5.md

latest3.2 KB
Original Source

DxChartConstantLineLabel.VerticalAlignment Property

Aligns constant line labels vertically.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
[Parameter]
public VerticalAlignment? VerticalAlignment { get; set; }

Property Value

TypeDescription
Nullable<VerticalAlignment>

An enumeration value.

|

Available values:

NameDescription
Top

Aligns the items or text at the top.

| | Center |

Aligns the items or text at the center.

| | Bottom |

Aligns the items or text at the bottom.

|

Remarks

Use HorizontalAlignment and VerticalAlignment properties to align constant line labels horizontally and vertically. The table below demonstrates how alignment properties apply to constant line labels based on the axis type.

AxisHorizontalAlignmentVerticalAlignment
Value Axis
Argument Axis
razor
<DxChart Data="@WeatherForecasts">
    <DxChartTitle Text="Annual Weather in New York" />
    <DxChartLineSeries SummaryMethod="@(i => i.Average())"
                       Color="@Color.Gray"
                       ValueField="@((DetailedWeatherSummary i) => i.AverageTemperatureF)"
                       ArgumentField="@(i => new DateTime(2000, i.Date.Month, 1))"
                       Name="Temperature, °F"
                       Filter="@((DetailedWeatherSummary i) => i.City == "NEW YORK")" />
    <DxChartLegend Visible="false" />
    <DxChartValueAxis>
        <DxChartAxisTitle Text="Temperature, °F" />
        <DxChartConstantLine Value="55">
            <DxChartConstantLineLabel HorizontalAlignment="HorizontalAlignment.Right"
                                      Text="55, °F" />
        </DxChartConstantLine>
    </DxChartValueAxis>
    <DxChartArgumentAxis>
        <DxChartAxisLabel Format="ChartElementFormat.Month" />
        <DxChartConstantLine Value="@(new DateTime(2000, 6, 1))">
            <DxChartConstantLineLabel VerticalAlignment="VerticalAlignment.Center"
                                      Text="June, 2000"/>
        </DxChartConstantLine>
    </DxChartArgumentAxis>
</DxChart>

See Also

DxChartConstantLineLabel Class

DxChartConstantLineLabel Members

DevExpress.Blazor Namespace