GetSelectionPoints()

View as Markdown

Definition

Returns the chart object’s data points where the user can interact. These points are used to visually indicate that the chart object is selected and allow the user to manipulate the chart object. This method is only called when IsSelected is set to true.

Method Return Value

A collection of Points representing the x- and y-coordinates of the chart object.

Syntax

You must override the method using the following syntax:

public override Point[] GetSelectionPoints(ChartControl chartControl, ChartScale chartScale)\{ \}

Method Parameters

ParameterDescription
chartControlA ChartControl representing the x-axis
chartScaleA ChartScale representing the y-axis

Examples

1public override Point[] GetSelectionPoints(ChartControl chartControl, ChartScale chartScale)
2{
3 ChartPanel chartPanel = chartControl.ChartPanels[chartScale.PanelIndex];
4 // get the anchor point to be displayed on the drawing tool
5 Point anchorPoint = Anchor.GetPoint(chartControl, chartPanel, chartScale, false);
6 return new[] { anchorPoint };
7}