Skip to main content
All docs
V25.1
  • DxPolarChart<T>.SelectSeries(String) Method

    Selects a series with the specified name.

    Namespace: DevExpress.Blazor

    Assembly: DevExpress.Blazor.v25.1.dll

    NuGet Package: DevExpress.Blazor

    Declaration

    public void SelectSeries(
        string seriesName
    )

    Parameters

    Name Type Description
    seriesName String

    The series name.

    Remarks

    Set the DxPolarChart.SeriesSelectionMode property to Single or Multiple to enable series selection in <DxPolarChart>.

    Call SelectSeries method overloads to select a specific series in code. For line and area series, the Polar Chart component applies selection based on the corresponding SelectionMode property value:

    To deselect a series in code, call DeselectSeries method overloads. You can also call the ClearSelectionAsync() method to reset selection in the entire Polar Chart component.

    When you call SelectSeries or DeselectSeries method overloads, <DxPolarChart> raises the SelectionChanged event. You can obtain information about the selected series in the event handler.

    Example

    The following code snippet selects and deselects the specified chart series on button clicks:

    DxPolarChart - Series Selection in Code

    <DxPolarChart Data="@DataSource"
                  Width="600px"
                  Height="400px"
                  @ref="polarChart"
                  SeriesSelectionMode="ChartSelectionMode.Single">
        <DxPolarChartBarSeries ArgumentField="@((StatisticPoint v) => v.Country)"
                               ValueField="@((StatisticPoint v) => v.Population24)"
                               Name="2024" />
        <DxPolarChartLineSeries ArgumentField="@((StatisticPoint v) => v.Country)"
                                ValueField="@((StatisticPoint v) => v.Population23)"
                                Name="2023" />
        <DxChartTitle Text="Population by Country" />
        <DxChartLegend Orientation="Orientation.Vertical"
                       HorizontalAlignment="HorizontalAlignment.Right"
                       Position="RelativePosition.Outside" />
    </DxPolarChart>
    
    <DxButton Text="Select a series"
              Click="SelectSeries"
              RenderStyleMode="ButtonRenderStyleMode.Outline" />
    <DxButton Text="Deselect a series"
              Click="DeselectSeries"
              RenderStyleMode="ButtonRenderStyleMode.Outline" />
    
    @code {
        DxPolarChart<StatisticPoint> polarChart;
        IEnumerable<StatisticPoint> DataSource = Enumerable.Empty<StatisticPoint>();
        protected override void OnInitialized() {
            DataSource = GenerateData();
        }
    
        void SelectSeries() {
            // Pass the series index (order) as a parameter
            polarChart.SelectSeries(1);
            // Pass the series name as a parameter
            polarChart.SelectSeries("2023");
        }
        void DeselectSeries() {
            // Pass the series index (order) as a parameter
            polarChart.DeselectSeries(1);
            // Pass the series name as a parameter
            polarChart.DeselectSeries("2023");
        }
    }
    
    See Also