GetASeries Method
GetASeries Method
Hi,
Can sombody explain the GetASeries method I can't find any reference to it in the Users Guide.
Thanks!
Can sombody explain the GetASeries method I can't find any reference to it in the Users Guide.
Thanks!
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi CCRyder,
You can find the reference at the help file:
The GetASeries function returns the FIRST Active Series in a Chart. If Chart has no Series, or none of the Series is Active, this function returns NIL.
You can find the reference at the help file:
The GetASeries function returns the FIRST Active Series in a Chart. If Chart has no Series, or none of the Series is Active, this function returns NIL.
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 |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi CCRyder,
You can do something like this:
You can do something like this:
Code: Select all
procedure TForm1.Chart1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
var i, SeriesIndex: Integer;
begin
SeriesIndex:=-1;
for i:=0 to Chart1.SeriesCount-1 do
if (Chart1[i].Clicked(X,Y)<>-1) then
begin
SeriesIndex:=i;
break;
end;
if (SeriesIndex<>-1) then
Chart1[SeriesIndex].Color := clLime;
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 |
Hi Narcis,
Is there a way to find out how many bars are in a specific gantt series? What I am trying to do is create a graph containing more than one Gantt Series and when I add a new series (which can have the same date and time for some of the bars) I want to locate this series under the first set of bars without having to enter the Y positions manually.
Best regards,
CCRyder
Is there a way to find out how many bars are in a specific gantt series? What I am trying to do is create a graph containing more than one Gantt Series and when I add a new series (which can have the same date and time for some of the bars) I want to locate this series under the first set of bars without having to enter the Y positions manually.
Best regards,
CCRyder
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi CCRyder,
You can see the number of values (bars) a gantt series has using:
To get its values and copy them to another series you could do something like this:
You can see the number of values (bars) a gantt series has using:
Code: Select all
Series1.Count
Code: Select all
procedure TForm1.FormCreate(Sender: TObject);
var i: Integer;
begin
Series1.FillSampleValues();
for i:=0 to Series1.Count-1 do
begin
Series2.AddGantt(Series1.StartValues[i],Series1.EndValues[i],Series1.YValues[i]);
end;
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 |
Hi Narcis,
Your suggestion works fine but I am running into a problem with the Left Axis Text. When I enter a new series into the Gantt Chart the previous series scrolls up but the text remains in the same position on the Left Axis. What do I have to do to get the text to scroll with the series?
Your suggestion works fine but I am running into a problem with the Left Axis Text. When I enter a new series into the Gantt Chart the previous series scrolls up but the text remains in the same position on the Left Axis. What do I have to do to get the text to scroll with the series?
Regards,
CCRyder
CCRyder
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi CCRyder,
I'm not sure on how to reproduce this. Could you please send us an example we can run "as-is" or some code to reproduce the problem here?
You can post your files at news://www.steema.net/steema.public.attachments newsgroup.
Thanks in advance.
I'm not sure on how to reproduce this. Could you please send us an example we can run "as-is" or some code to reproduce the problem here?
You can post your files at news://www.steema.net/steema.public.attachments newsgroup.
Thanks in advance.
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 |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi CCRyder,
Sorry but I still don't know how to reproduce this issue. Could you please send us an example project, some code or further information on how to reproduce the problem here?
Thanks in advance.
Sorry but I still don't know how to reproduce this issue. Could you please send us an example project, some code or further information on how to reproduce the problem here?
Thanks in advance.
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 |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi CCRyder,
This is because only the labels for the first series in the chart are drawn. To achieve what you request you should use custom labels as shown in the “All Features\Welcome!\Axes\Labels\Custom Labels” example in the features demo available at TeeChart’s program group.
Also find attached the modified project at the attachments newsgroup.
This is because only the labels for the first series in the chart are drawn. To achieve what you request you should use custom labels as shown in the “All Features\Welcome!\Axes\Labels\Custom Labels” example in the features demo available at TeeChart’s program group.
Also find attached the modified project at the attachments newsgroup.
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 |