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.Text Property

Specifies a legend item’s text.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
[Parameter]
public string Text { get; set; }

#Property Value

Type Description
String

A legend item’s text.

#Remarks

The Chart component generates a legend item’s text based on the corresponding series’s name. To override the generated legend item’s text, use the Text property.

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" Text="Last year"/>
</DxChartLineSeries>

Chart Legend

Run Demo: Charts - Legend Customization

See Also