1

Steema TeeChart VCL/FMX Delphi X3 Enterprise

I have a chart that has 10 vertical bars. When I click a bar I will display detail information about that bar. I need the label of the bar I just clicked.

Donald Adams
  • 147
  • 1
  • 10

1 Answers1

1

To get the label text of the just clicked value (in your case a vertical bar), you can inspire in the following method written for the OnClickSeries event:

procedure TForm1.Chart1ClickSeries(Sender: TCustomChart; Series: TChartSeries;
  ValueIndex: Integer; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
  ShowMessage(Series.Labels[ValueIndex]);
end;
TLama
  • 75,147
  • 17
  • 214
  • 392