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

DxChartLegend.AllowToggleSeries Property

Specifies whether users can toggle series visibility.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
[Parameter]
public bool AllowToggleSeries { get; set; }

#Property Value

Type Description
Boolean

true, to allow users to toggle series visibility; otherwise, false.

#Remarks

Set the AllowToggleSeries property to true to show and hide series when a user clicks the corresponding legend item.

Note

The AllowToggleSeries property does not affect legend items that use text templates.

Razor
<DxChart Data="@SalesData">
    @* ... *@
    <DxChartLegend AllowToggleSeries="true" Orientation="Orientation.Vertical" HorizontalAlignment="HorizontalAlignment.Right">
        <DxChartTitle Text="Legend">
        </DxChartTitle>
    </DxChartLegend>
</DxChart>

Run Demo: Charts - Legend Customization

See Also