# Converting Coordinates to Series

## Content



In the C1Chart Legend, series are represented by the series name and a symbol containing a sample of the [SymbolStyle](/componentone/api/win/online-chart2d/dotnet-framework-api/C1.Win.C1Chart.4.8/C1.Win.C1Chart.ChartDataSeries.SymbolStyle.html) or [LineStyle](/componentone/api/win/online-chart2d/dotnet-framework-api/C1.Win.C1Chart.4.8/C1.Win.C1Chart.ChartDataSeries.LineStyle.html). The [SeriesFromCoord](/componentone/api/win/online-chart2d/dotnet-framework-api/C1.Win.C1Chart.4.8/C1.Win.C1Chart.Legend.SeriesFromCoord.html) 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:

DOC-DETAILS-TAG-OPEN

DOC-SUMMARY-TAG-OPEN

To write code in Visual Basic

DOC-SUMMARY-TAG-CLOSE

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

DOC-DETAILS-TAG-CLOSE

DOC-DETAILS-TAG-OPEN

DOC-SUMMARY-TAG-OPEN

To write code in C#

DOC-SUMMARY-TAG-CLOSE

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

DOC-DETAILS-TAG-CLOSE


> type=note
> **Note**: For a complete sample using this method, see **DataStyl** or **PieStuff** sample located [here](https://developer.mescius.com/samples).

## See Also

[Converting Pixel Coordinates into Data Points and Vice Versa](/componentone/docs/win/online-chart2d/enduserinteraction/coordinateconversion/convertingpixelcoord)