Skip to main content
A newer version of this page is available. .

DxChartSeries.Visible Property

Specifies the series visibility.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v20.2.dll

NuGet Package: DevExpress.Blazor

Declaration

[DefaultValue(true)]
[Parameter]
public bool Visible { get; set; }

Property Value

Type Default Description
Boolean **true**

true, to display the series; otherwise, false.

Remarks

Set the Visible option to false to hide the series.

<DxChart Data="@ChartsData">
    <DxChartLineSeries Name="2017" Visible=false Filter="@((SaleInfo s) => s.Date.Year == 2017)" 
                       ArgumentField="@(s => s.City)" ValueField="@(s => s.Amount)" />
    <DxChartLineSeries Name="2018" Filter="@((SaleInfo s) => s.Date.Year == 2018)"
                       ArgumentField="@(s => s.City)" ValueField="@(s => s.Amount)" />
    <DxChartLineSeries Name="2019" Filter="@((SaleInfo s) => s.Date.Year == 2019)"
                       ArgumentField="@(s => s.City)" ValueField="@(s => s.Amount)" />
    <DxChartLegend Position="RelativePosition.Outside" HorizontalAlignment="HorizontalAlignment.Right" />
</DxChart>

If the AllowToggleSeries property is set to true, the series legend item provides a checkbox that allows users to hide and show the series. Otherwise, the legend item of a hidden series is disabled.

Online Demo

Charts - Legend Customization

See Also