Hi,
I have some Pie Charts (TDBChart) where I have grouped slices where the values are less than 5%.
The chart displays just fine, but I want to be able to quickly get the 'X' values for the grouped slice, if the user clicks on the grouped slice. For the non-grouped slices, I get the clicked slice X value using Series.Labels[ValueIndex] in an OnClickSeries event. Obviously if I click on the grouped slice, this approach just gives me the 'Grouped Slices' 'Label' value.
I need the X values for building subsequent SQL statements.
Is there a simple way to get the X values that have been grouped?
Thanks
Clive
Group Slices getting values
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Group Slices getting values
Hi Clive,
The code snippet below returns the number of one last additional slice containing all grouped slices. So this is not possible for now. I have added your request to the wish-list to be considered for inclusion in future releases: http://bugs.teechart.net/show_bug.cgi?id=1480
The code snippet below returns the number of one last additional slice containing all grouped slices. So this is not possible for now. I have added your request to the wish-list to be considered for inclusion in future releases: http://bugs.teechart.net/show_bug.cgi?id=1480
Code: Select all
procedure TForm1.Chart1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
var Index: Integer;
begin
Index:=Series1.Clicked(X,Y);
if Index <> -1 then
Chart1.Title.Text[0] := IntToStr(Index);
end;
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |