Skip to main content
All docs
V24.1

DxPolarChart<T>.SeriesClick Event

Fires when a user clicks a series.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.1.dll

NuGet Package: DevExpress.Blazor

Declaration

[Parameter]
public EventCallback<PolarChartSeriesClickEventArgs> SeriesClick { get; set; }

Event Data

The SeriesClick event's data class is PolarChartSeriesClickEventArgs. The following properties provide information specific to this event:

Property Description
Point Returns the clicked point.
Series Returns the clicked series.

Remarks

Handle the SeriesClick event to obtain information about the clicked series point. Event arguments store information about the clicked point and the series to which the point belongs.

The following code example displays the clicked point’s argument, value, and series name:

Spider Web - Series Click

<DxPolarChart Data=@DataSource 
              UseSpiderWeb="true"
              SeriesClick="OnClick">
    @foreach(var info in SeriesInfos) {
        <DxPolarChartLineSeries Name="@name" ArgumentField="@argumentField" ValueField="@valueField"/>
    }
</DxPolarChart>

@country produces @pointValue million tons of @fruit.

@code {
    string fruit;
    object pointValue, country;
    void OnClick(PolarChartSeriesClickEventArgs args) {
        fruit = args.Series.Name;
        pointValue = args.Point.Value;
        country = args.Point.Argument;
    }

    public class SeriesInfo {
        public string Name { get; set; }
        public Expression<Func<SpiderPoint, object>> ValueField { get; set; }

        public SeriesInfo (string name, Expression<Func<SpiderPoint, object>> valueField) {
            Name = name;
            ValueField = valueField;
        }
    }

    IEnumerable<SeriesInfo> SeriesInfos = new List<SeriesInfo>() {
        new SeriesInfo("Apples", i => i.Apples),
        new SeriesInfo("Grapes", i => i.Grapes),
        new SeriesInfo("Lemons", i => i.Lemons),
        new SeriesInfo("Oranges", i => i.Oranges),
    };

    IEnumerable<SpiderPoint> DataSource = Enumerable.Empty<SpiderPoint>();

    protected override void OnInitialized () {
        DataSource = ChartSpiderDataProvider.GenerateData();
        SelectedSeries = SeriesTypes.FirstOrDefault();
    }
}
See Also