Back to Devexpress

DxChart<T>.PointSelectionMode Property

blazor-devexpress-dot-blazor-dot-dxchart-1-aa1a3dc6.md

latest2.8 KB
Original Source

DxChart<T>.PointSelectionMode Property

Specifies whether a user can select series points.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
[DefaultValue(ChartSelectionMode.None)]
[Parameter]
public ChartSelectionMode PointSelectionMode { get; set; }

Property Value

TypeDefaultDescription
ChartSelectionModeNone

A value that identifies a selection mode.

|

Available values:

NameDescription
None

A user cannot select points or series.

| | Single |

A single point or series can be selected at the same time.

| | Multiple |

Multiple points or series can be selected at the same time.

|

Remarks

A user can click a series point to select or deselect it:

You can also specify the DxChart.SeriesSelectionMode property to allow users to select entire series. Note that for bar and stacked bar series, the PointSelectionMode property has higher priority than SeriesSelectionMode.

Example

The following example enables selection for a line chart:

  • A user can select multiple points. Points with the same argument are selected when the user selects a point.
  • A user can select an entire series by clicking a line segment. When the user selects a series, the selection of the previously selected series is reset.

razor
<DxChart Data="@dataPoints"
         SeriesSelectionMode=ChartSelectionMode.Single
         PointSelectionMode=ChartSelectionMode.Multiple>
    <DxChartLineSeries ArgumentField="@((DataPoint i) => i.Arg)"
                       ValueField="@((DataPoint i) => i.Value1)"
                       Name="Series 1"
                       HoverMode=ChartContinuousSeriesHoverMode.None
                       SelectionMode=ChartContinuousSeriesSelectionMode.Series>
        <DxChartSeriesPoint HoverMode=ChartSeriesPointHoverMode.None
                            SelectionMode=ChartSeriesPointSelectionMode.AllPointsForArgument />
    </DxChartLineSeries>
    @* ... *@
</DxChart>

See Also

DxChart<T> Class

DxChart<T> Members

DevExpress.Blazor Namespace