[]
        
(Showing Draft Content)

Converting Coordinates to Series

In the C1Chart Legend, series are represented by the series name and a symbol containing a sample of the SymbolStyle or LineStyle. The SeriesFromCoord method of the Legend returns the nearest associated series from a pixel coordinate value located in the legend. For instance, suppose that the user clicks on the symbol for the first series in the Legend, the pixel coordinates of the user's mouse at this moment when input into the SeriesFromCoord method would return group and series values from the Group and Series parameters. The following is an example of this:

To write code in Visual Basic

Dim LegendGroup As Integer      
Dim LegendSeries As Integer 
C1Chart1.Legend.SeriesFromCoord(170, 275, LegendGroup, LegendSeries)

To write code in C#

int LegendGroup = 0;   
int LegendSeries = 0;      
c1Chart1.Legend.SeriesFromCoord(170, 275, ref LegendGroup, ref LegendSeries);

type=note

Note: For a complete sample using this method, see DataStyl or PieStuff sample located here.

See Also

Converting Pixel Coordinates into Data Points and Vice Versa