Back to Devexpress

DxChartSeriesLabel.RotationAngle Property

blazor-devexpress-dot-blazor-dot-dxchartserieslabel-8f9d29ed.md

latest2.4 KB
Original Source

DxChartSeriesLabel.RotationAngle Property

Specifies the rotation angle of series labels.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
[Parameter]
public double RotationAngle { get; set; }

Property Value

TypeDescription
Double

The rotation angle in degrees.

|

Remarks

The following example rotates labels of the DxChartLineSeries at the specified angle:

razor
<DxChart Data="@WeatherForecasts"
         Width="100%">
    <DxChartTitle Text="Annual Weather in New York" />
    <DxChartLineSeries SummaryMethod="@(i => i.Average())"
                       ValueField="@((DetailedWeatherSummary i) => i.AverageTemperatureF)"
                       ArgumentField="@(i => new DateTime(2000, i.Date.Month, 1))"
                       Name="Temperature, F"
                       Filter="@((DetailedWeatherSummary i) => i.City == "NEW YORK")">
        <DxChartSeriesLabel Visible="true"
                            Position="RelativePosition.Outside"
                            FormatPattern="{argument:MMMM}: {value:#.##} °F"
                            RotationAngle="90">
            <DxChartSeriesLabelConnector Visible="true"
                                         Width="3" />
        </DxChartSeriesLabel>
    </DxChartLineSeries>
    <DxChartLegend Visible="false" />
    <DxChartValueAxis>
        <DxChartAxisTitle Text="Temperature, °F" />
    </DxChartValueAxis>
    <DxChartArgumentAxis>
        <DxChartAxisLabel Format="ChartElementFormat.Month" />
    </DxChartArgumentAxis>
</DxChart>

@code {
    IEnumerable<DetailedWeatherSummary> WeatherForecasts;

    protected override async Task OnInitializedAsync() {
        WeatherForecasts = await WeatherSummaryDataProvider.GetDataAsync();
    }
}

See Also

DxChartSeriesLabel Class

DxChartSeriesLabel Members

DevExpress.Blazor Namespace