Back to Devexpress

DxPieChartSeries<T, TArgument, TValue>.Visible Property

blazor-devexpress-dot-blazor-dot-dxpiechartseries-3-c441fc8a.md

latest2.7 KB
Original Source

DxPieChartSeries<T, TArgument, TValue>.Visible Property

Specifies the series visibility.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

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

Property Value

TypeDefaultDescription
Booleantrue

true to display the series; otherwise, false.

|

Remarks

Set the Visible option to false to hide the series.

razor
<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>

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.

razor
<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>

Run Demo: Charts - Legend Customization

See Also

DxPieChartSeries<T, TArgument, TValue> Class

DxPieChartSeries<T, TArgument, TValue> Members

DevExpress.Blazor Namespace