1

I'm drawing some TLineSeries on a TChart, I set values with this:

serie.Add(IncMinute(now,-j),Random(100),'My Label',clBlue);

And then I showing values on event ChartToolset1DataPointCrosshairTool1AfterMouseMove.

I get X and Y value with:

y := Serie.GetYValue(tool.PointIndex); my_date := Serie.GetXValue(tool.PointIndex);

And now I need to recover the value of the label and I cannot find how to do this, I need to get 'My Label', but maybe I'm wrong and this is impossible.

Thank you.

1 Answers1

0

Given you already have tool.PointIndex you can use that to retrieve labels, for example:

label := Serie.Labels[tool.PointIndex];
Narcís Calvet
  • 7,304
  • 5
  • 27
  • 47