I am using TeeChart Pro 7.09 (BDS2006) with Intraweb 8 (via TIWChart), and rendering a pie chart.
I would like to handle an OnClick event and determine which slice was clicked.
It looks like the TIWChart.OnMouseDown gives me the screen X and Y.
How can I figure out which slice (i.e. which series value index) corresponds to this screen XY?
Thanks in advance.
David Rueter
drueter@assyst.com
TeeChart / Intraweb / Onclick
Hello drueter,
You can use OnClick event as follows:
You can use OnClick event as follows:
Code: Select all
procedure TForm1.Series1Click(Sender: TChartSeries; ValueIndex: Integer;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
Chart1.Title.Caption := 'Clicked Pie: ' + inttostr(Series1.CalcClickedPie(X,Y));
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |