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
[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:
<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