blazor-devexpress-dot-blazor-dot-dxchartserieslabel-b0ee28a5.md
Specifies the radial offset of pie series labels.
Namespace : DevExpress.Blazor
Assembly : DevExpress.Blazor.v25.2.dll
NuGet Package : DevExpress.Blazor
[DefaultValue(0)]
[Parameter]
public double RadialOffset { get; set; }
| Type | Default | Description |
|---|---|---|
| Double | 0 |
The radial offset in pixels.
|
The RadialOffset property value radially shifts series labels. A positive value shifts labels away from the chart center, a negative value – towards the center.
Note
The RadialOffset property value applies to DxPieChartSeries labels only.
The following code snippet uses a spin editor to shift series labels radially:
<label><strong>Radial Offset, px: </strong></label>
<DxSpinEdit @bind-Value="@CurrentRadialOffset" Increment="10" />
<DxPieChart Data="@DataSource"
Height="350px">
<DxPieChartSeries ArgumentField="@((StatisticPoint v) => v.Country)"
ValueField="@((StatisticPoint v) => v.Population24)"
Name="2024">
<DxChartSeriesLabel Visible="true"
RadialOffset="@CurrentRadialOffset"
FormatPattern="{argument}: {value}">
<DxChartSeriesLabelConnector Visible="true" />
</DxChartSeriesLabel>
</DxPieChartSeries>
<DxChartLegend Visible="false" />
<DxChartTitle Text="Population by European Country, 2024" />
</DxPieChart>
@code{
double CurrentRadialOffset { get; set; } = 0;
IEnumerable<StatisticPoint> DataSource = Enumerable.Empty<StatisticPoint>();
protected override void OnInitialized() {
DataSource = GenerateData();
}
}
public static List<StatisticPoint> GenerateData() {
return new List<StatisticPoint>() {
new StatisticPoint("Germany", 84552242, 83294633),
new StatisticPoint("UK", 69138192, 67736802),
new StatisticPoint("France", 66548530, 64756584),
new StatisticPoint("Italy", 59342867, 58870763),
new StatisticPoint("Spain", 47910526, 47519628),
};
}
public class StatisticPoint {
public string Country { get; set; }
public int Population24 { get; set; }
public int Population23 { get; set; }
public StatisticPoint(string country, int population24, int population23) {
Country = country;
Population24 = population24;
Population23 = population23;
}
}
See Also