ComponentOne Chart for .NET (2.0) Search HelpCentral 

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:

·      Visual Basic

Dim LegendGroup As Integer

Dim LegendSeries As Integer

C1Chart1.Legend.SeriesFromCoord(170, 275, LegendGroup, LegendSeries)

·      C#

int LegendGroup = 0;

int LegendSeries = 0;

C1Chart1.Legend.SeriesFromCoord(170, 275, ref LegendGroup, ref LegendSeries);

·      Delphi

var

  LegendSeries: Integer;

  LegendGroup: Integer;

begin

  C1Chart1.Legend.SeriesFromCoord(170, 275, LegendGroup, LegendSeries);

end;

For a complete sample using this method, see DataStyl or PieStuff sample located on http://helpcentral.componentone.com/ProductResources.aspx.


Send comments about this topic to ComponentOne.
Copyright © ComponentOne LLC. All rights reserved.