문제

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.

도움이 되었습니까?

해결책

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;
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top