Back to Devexpress

DxChartLegend.AllowToggleSeries Property

blazor-devexpress-dot-blazor-dot-dxchartlegend-6fc4d91e.md

latest1.5 KB
Original Source

DxChartLegend.AllowToggleSeries Property

Specifies whether users can toggle series visibility.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
[Parameter]
public bool AllowToggleSeries { get; set; }

Property Value

TypeDescription
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

DxChartLegend Class

DxChartLegend Members

DevExpress.Blazor Namespace