Hello supportteam,
I am using Delphi 6 and TeeChart Pro v5.02.
I have a teechart with a dynamic amount of series.
Big version
So i add Series1 for 'Line19', 'Line20' and for 'Line21'. So i have three bars displayed but only one series.
When i add this series i would like to add the index of this three bars to a list.
But how can i do this? How do i know the index e.g. for Series1 'Line21'?
Background information:
When i add the series i would like to add the series index to a list with more information about this bar.
Then i would like to add a individual mark text for each displayed bar in the 'OnMarkTextEvent'.
Do you know a better way how to tagging a bar to add a individual mark text?
Get a BarSeries by Index
-
- Newbie
- Posts: 20
- Joined: Wed Jul 11, 2001 4:00 am
- Location: Bavaria
- Contact:
-
- Advanced
- Posts: 228
- Joined: Tue Aug 28, 2007 12:00 am
- Location: Oregon, USA
-
- Newbie
- Posts: 20
- Joined: Wed Jul 11, 2001 4:00 am
- Location: Bavaria
- Contact:
Thanks for the answer.
Yep thats right.. but i need the index param when i am adding a value to the bar --> outside the OnMarkTextEvent.
I need this because i would like to save more information about this bar in a list when adding a y value to the bar. Then in the OnMarkTextEvent i would like to search the list items which one has the same index param and then add a mark text that is in the list item to show an individual text for every bar.
Hope thats clear. Thanks!
Yep thats right.. but i need the index param when i am adding a value to the bar --> outside the OnMarkTextEvent.
I need this because i would like to save more information about this bar in a list when adding a y value to the bar. Then in the OnMarkTextEvent i would like to search the list items which one has the same index param and then add a mark text that is in the list item to show an individual text for every bar.
Hope thats clear. Thanks!
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi AChatSoluions,
You can obtain each series and point indexes like this:
Hope this helps!
You can obtain each series and point indexes like this:
Code: Select all
Uses Series;
procedure TForm1.FormCreate(Sender: TObject);
var SeriesIndex, ValueIndex: Integer;
tmpSeries: TChartSeries;
begin
tmpSeries:=Chart1.AddSeries(TBarSeries.Create(self));
SeriesIndex:=Chart1.SeriesList.IndexOf(tmpSeries);
ValueIndex:=Chart1.Series[SeriesIndex].Add(random);
Chart1.Title.Text.Clear;
Chart1.Title.Text.Add(IntToStr(SeriesIndex));
Chart1.Title.Text.Add(IntToStr(ValueIndex));
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 |
-
- Newbie
- Posts: 20
- Joined: Wed Jul 11, 2001 4:00 am
- Location: Bavaria
- Contact: