Skip to main content

DxPieChartSeries<T, TArgument, TValue>.Visible Property

Specifies the series visibility.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.1.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.

<DxPieChart Data="@SalesData">
    <DxPieChartSeries T="SaleInfo"
                      TArgument="string"
                      TValue="double"
                      ValueField="si => si.Amount"
                      ArgumentField="si => si.Region"
                      SummaryMethod="Enumerable.Sum"
                      Visible="false">
    </DxPieChartSeries>
    <DxPieChartSeries T="SaleInfo"
                      TArgument="string"
                      TValue="double"
                      ValueField="si => si.Amount"
                      ArgumentField="si => si.City"
                      SummaryMethod="Enumerable.Sum">
    </DxPieChartSeries>
    <DxChartLegend Visible="false" />
</DxPieChart>

Invisible Pie Series

If the AllowToggleSeries property is set to true, the series legend item displays a checkbox that allows users to hide and show pie sectors. You can also handle the VisibleChanged event to react to the series visibility changes.

<DxPieChart Data="@SalesData">
    <DxPieChartSeries T="SaleInfo"
                      TArgument="string"
                      TValue="double"
                      ValueField="si => si.Amount"
                      ArgumentField="si => si.Region"
                      SummaryMethod="Enumerable.Sum">
    </DxPieChartSeries>
    <DxChartLegend AllowToggleSeries="true"
                   Position="RelativePosition.Outside" />
</DxPieChart>

Pie Chart - Allow Toggle Series

Run Demo: Charts - Legend Customization

See Also