DBChart problem

Freerider
Freerider used Ask the Experts™
on
Hi,

I have a DBChart connected to my Customer table. When the pie chart displays the customers, is it possible to click on a piece of the pie to open up the customer details for that particular customer?

Thanks,
Freerider.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
From the Object Inspector, select the Series that correspond to your PieChart. Then add an OnClick handler.

procedure TForm1.Series1Click(Sender: TChartSeries; ValueIndex: Integer;
  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
  // ValueIndex holds the slice that was clicked, and
  // can be used to retrieve relevant info, such as
  ShowMessage(Series1.XLabel[ValueIndex]);
  // You can then build your new query based on this info
end;



HTH
DragonSlayer

Author

Commented:
Thanks DragonSlayer,

Perfect!
Easy 100 points eh?

Freerider.
:)

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial