GetSelectionPoints()

<< Click to Display Table of Contents >>

Navigation:  NinjaScript > Language Reference > Drawing Tool >

GetSelectionPoints()

Previous page Return to chapter overview Next page

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

chartControl

A ChartControl representing the x-axis

chartScale

A ChartScale representing the y-axis

 

 

Examples

ns


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

{        

 

 ChartPanel chartPanel = chartControl.ChartPanels[chartScale.PanelIndex];

                 

// get the anchor point to be displayed on the drawing tool

 Point anchorPoint = Anchor.GetPoint(chartControl, chartPanel, chartScale, false);

         return new[] { anchorPoint } ;

}