DxPolarChart<T>.SelectPoints(String, T[]) Method
Selects specific series points.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v24.2.dll
NuGet Package: DevExpress.Blazor
Declaration
public void SelectPoints(
string seriesName,
params T[] points
)
Parameters
Name | Type | Description |
---|---|---|
seriesName | String | The series name. |
points | T[] | Data points. |
Remarks
Set the DxPolarChart.PointSelectionMode property to Single
or Multiple
to enable point selection in <DxPolarChart>
.
Call the following methods to manage point selection in code:
SelectPoints
- Select specific series points in code.
- DeselectPoints
- Deselect specific series points in code.
- ClearSelectionAsync()
- Resets selection in the entire Chart component.
SelectPoints
and DeselectPoints method overloads accept a single or multiple data points as parameters. The Polar Chart component applies point selection based on the corresponding SelectionMode
property value:
When you call SelectPoints
or DeselectPoints method overloads, <DxPolarChart>
raises the SelectionChanged event. You can obtain information about the selected point in the event handler.
Example
The following code snippet selects and deselects points of the specified series on button clicks:
<DxPolarChart Data="@DataSource"
Width="600px"
Height="400px"
@ref="polarChart"
PointSelectionMode="ChartSelectionMode.Multiple">
<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 points"
Click="SelectPoints"
RenderStyleMode="ButtonRenderStyleMode.Outline" />
<DxButton Text="Deselect points"
Click="DeselectPoints"
RenderStyleMode="ButtonRenderStyleMode.Outline" />
@code {
DxPolarChart<StatisticPoint> polarChart;
IEnumerable<StatisticPoint> DataSource = Enumerable.Empty<StatisticPoint>();
protected override void OnInitialized() {
DataSource = GenerateData();
}
void SelectPoints() {
// Pass the series index (order) as a parameter
polarChart.SelectPoints(0, DataSource.First(), DataSource.Last());
// Pass the series index (order) as a parameter
polarChart.SelectPoints("2024", DataSource.First(), DataSource.Last());
}
void DeselectPoints() {
// Pass the series index (order) as a parameter
polarChart.DeselectPoints(0, DataSource.First());
// Pass the series name as a parameter
polarChart.DeselectPoints("2024", DataSource.First());
}
}