DxChartSeriesLabel.BackgroundColor Property
Specifies the label background color.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v24.2.dll
NuGet Package: DevExpress.Blazor
Declaration
[Parameter]
public Color BackgroundColor { get; set; }
Property Value
Type | Description |
---|---|
Color | The background color. |
Remarks
The label background color depends on the color of the corresponding series or point. Use the BackgroundColor
property to customize the label background color.
Pie Chart Specifics
When the DxChartSeriesLabel.Position property is set to Inside
, series labels may go beyond the boundaries of pie sectors. In this case, set the BackgroundColor
property to transparent
to display series labels correctly:
@using System.Drawing
<DxPieChart Data="@SalesData"
InnerDiameter="0.5"
T="SaleInfo">
<DxPieChartSeries T="SaleInfo"
TArgument="string"
TValue="double"
ValueField="si => si.Amount"
ArgumentField="si => si.Country"
SummaryMethod="Enumerable.Sum">
<DxChartSeriesLabel Visible="true"
Position="RelativePosition.Inside"
ValueFormat="ChartElementFormat.Thousands(1)"
BackgroundColor="System.Drawing.Color.Transparent">
</DxChartSeriesLabel>
</DxPieChartSeries>
<DxChartTitle Text="Sales by Country">
<DxChartSubTitle Text="USD" />
</DxChartTitle>
@* ... *@
</DxPieChart>
See Also