Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DxChartSeriesLegendItem Class

Defines an item that indicates a series in the legend.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
public class DxChartSeriesLegendItem :
    DxSettingsComponent<ChartSeriesLegendItemModel>

#Remarks

Use the IconCssClass property to alter the series icon in the legend. To customize the item text, you can define Text and TextTemplate properties.

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

Chart Legend

Run Demo: Charts - Legend Customization

#Inheritance

Object
ComponentBase
DxSettingsComponent<DevExpress.Blazor.Internal.ChartSeriesLegendItemModel>
DxChartSeriesLegendItem
See Also