Skip to main content
All docs
V24.2

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

DxPolarChartBaseSeries<T, TArgument, TValue>.VisibleChanged Event

Fires when series visibility changes.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
[Parameter]
public EventCallback<bool> VisibleChanged { get; set; }

#Parameters

Type Description
Boolean

The new Visible property value.

#Remarks

If the AllowToggleSeries property value is true, the series legend item displays a check box that allows users to hide or display the series. Handle the VisibleChanged event to handle series visibility changes.

The following snippet displays a message when a user hides the Night series:

Razor
<DxPolarChart Data=@DataSource>
    <DxChartLegend Position="RelativePosition.Outside"
                   AllowToggleSeries="true" />
    <DxPolarChartLineSeries ArgumentField="@((DiscretePoint i) => i.Arg)"
                            ValueField="@((DiscretePoint i) => i.Day)"
                            Name="Day">
    </DxPolarChartLineSeries>
    <DxPolarChartLineSeries ArgumentField="@((DiscretePoint i) => i.Arg)"
                            ValueField="@((DiscretePoint i) => i.Night)"
                            Name="Night"
                            VisibleChanged="OnVisibleChanged">
    </DxPolarChartLineSeries>
</DxPolarChart>

@if(AlertVisible){
    <p>Night-related data is unavailable!</p>
}

@code {
    bool AlertVisible = false;

    void OnVisibleChanged(bool newVisible) {
        if(!newVisible)
            AlertVisible = true;
        else
            AlertVisible = false;
    }
    @* ... *@
}

See Also