Setting series values programatically in ReportBuilder Chart

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Doogie
Newbie
Newbie
Posts: 12
Joined: Mon Oct 22, 2007 12:00 am
Contact:

Setting series values programatically in ReportBuilder Chart

Post by Doogie » Tue Nov 13, 2007 9:15 pm

I'm having difficulty setting the values for series programatically in a ReportBuilder chart

ppReport1.ppTeeChart

How do I add two series ie SeriesH, and SeriesL
It must be a TBarSeries.

I have the series data loaded in a memo.

Usually I would just:
Series1.clear;
SeriesTextSource1.LoadFromStrings(Memo1)

Now with the ppReport, I'm limited in that cannot drop a SeriesTextSource onto the report.

Any help will greatly be appreciated. Perhaps an example.

Regards

Doogie

Doogie
Newbie
Newbie
Posts: 12
Joined: Mon Oct 22, 2007 12:00 am
Contact:

Post by Doogie » Wed Nov 14, 2007 9:07 am

Well I've managed the following:

Have to add to uses clause: Bar3d // this one took me a while to figure out

Then I

Procedure...
Var
seriesA,SeriesB : Tbar3DSeries;
begin
...
SeriesA := TBar3DSeries.Create(Self);
...
ppTeeChart1.Chart.AddSeries(seriesA);
SeriesA.AddXY(x,y,'Label',clRed);
then I repeatedly just add the values.

Usually I would build the Values into a memo, then after all done, just LoadFromString(Memo1), but this works fine.
Any comments?

Regards
Doogie

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Wed Nov 14, 2007 9:28 am

Hi Doogie,

No, this code seems fine to me.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply