Skip to main content

DxChartSeriesLegendItem.IconCssClass Property

Specifies the cascading style sheet (CSS) class name for the series legend item.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v23.2.dll

NuGet Package: DevExpress.Blazor


public string IconCssClass { get; set; }

Property Value

Type Description

The CSS class name.


DevExpress Blazor components support pre-defined icon sets (such as Iconic or Bootstrap-recommended libraries) and custom icon libraries. Refer to the following topic for more information: Icons.

The following code customizes the series legend item:

<DxChartLineSeries Name="2019" Filter="@((SaleInfo s) => s.Date.Year == 2019)" 
                   ArgumentField="@(s=> s.City)" ValueField="@(s => s.Amount)">
    <DxChartSeriesLegendItem IconCssClass="oi oi-flag">
        <TextTemplate>Last year</TextTemplate>

Chart Legend

Run Demo: Charts - Legend Customization

Pie and Donut charts consists of one series only. You should specify one DxChartSeriesLegendItem item for these charts. The specified settings are applied to all legend items in the chart.

<DxChart Data="@SalesData">
    <DxChartTitle Text="Total Sales" />
    <DxChartLegend VerticalAlignment="VerticalEdge.Bottom" Position="RelativePosition.Outside" />
    <DxChartDonutSeries ValueField="@((SaleInfo i) => i.Amount)" 
                        ArgumentField="@(i => i.City)" 
        <DxChartSeriesLabel Visible="true" />
        <DxChartSeriesLegendItem IconCssClass="oi oi-flag">
            <TextTemplate>City: @context</TextTemplate>

Donut Chart Legend

See Also