Back to Devexpress

PolarChartSelectionChangedEventArgs Class

blazor-devexpress-dot-blazor-463e4701.md

latest3.4 KB
Original Source

PolarChartSelectionChangedEventArgs Class

Contains data for the SelectionChanged event.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
public class PolarChartSelectionChangedEventArgs :
    EventArgs

PolarChartSelectionChangedEventArgs is the data class for the following events:

Remarks

The following snippet displays the coordinates of a selected point:

razor
<DxPolarChart Data=@DataSource
              PointSelectionMode="ChartSelectionMode.Multiple" 
              SelectionChanged="OnSelectionChanged">
    <DxPolarChartArgumentAxis Inverted="true" StartAngle="90" TickInterval="30"/>
    <DxPolarChartLineSeries ArgumentField="@((DataPoint i) => i.X)"
                            ValueField="@((DataPoint i) => i.Y)">
    </DxPolarChartLineSeries>
</DxPolarChart>

<p>The (@Argument; @Value) point was selected.</p>

@code {
    IEnumerable<DataPoint> DataSource = Enumerable.Empty<DataPoint>();

    object Argument, Value;

    protected override void OnInitialized () {
        DataSource = ChartContinuousDataProvider.GenerateData();
    }

    void OnSelectionChanged(PolarChartSelectionChangedEventArgs args) {
        Argument = args.Point.Argument;
        Value = args.Point.Value;
    }
}
csharp
using System;
using System.Runtime.InteropServices;

namespace BlazorDemo.Data {
// ...
    public class DataPoint {
        public double X { get; }
        public double Y { get; }

        public DataPoint(double x, double y) {
            X = x;
            Y = y;
        }
    }
}
csharp
using System.Collections.Generic;
using BlazorDemo.Data;

// ...
    public class ChartContinuousDataProvider : IChartContinuousDataProvider {
        public List<DataPoint> GenerateData() {
            return new List<DataPoint>() {
                new DataPoint(0, 0),
                new DataPoint(30, 1.7),
                new DataPoint(45, 0),
                new DataPoint(60, 1.7),
                new DataPoint(90, 0),
                new DataPoint(120, 1.7),
                new DataPoint(135, 0),
                new DataPoint(150, 1.7),
                new DataPoint(180, 0),
                new DataPoint(210, 1.7),
                new DataPoint(225, 0),
                new DataPoint(240, 1.7),
                new DataPoint(270, 0),
                new DataPoint(300, 1.7),
                new DataPoint(315, 0),
                new DataPoint(330, 1.7),
                new DataPoint(360, 0),
            };
        }
    }

Inheritance

Object EventArgs PolarChartSelectionChangedEventArgs

See Also

PolarChartSelectionChangedEventArgs Members

DevExpress.Blazor Namespace