Series themes?

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Bart
Newbie
Newbie
Posts: 4
Joined: Tue Mar 31, 2009 12:00 am

Series themes?

Post by Bart » Thu Jan 28, 2010 3:37 pm

Hello.

Is there possibility to have something like series themes?
I would like to create some predefined series configurations, so user
can choose one of them, while creating chart, depending on what he needs.

I was wondering if I can use SaveChartToFile / LoadChartFromFile,
but I think it would be difficult, because those functions save or load
the whole chart.

Thanx for any help.
Bart

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

Re: Series themes?

Post by Narcís » Thu Jan 28, 2010 4:16 pm

Hi Bart,

Yes, you could use that. It would also import/export the series in the chart with your custom settings. You can also choose whether you want to include chart's data. Does this fit your needs?
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

Bart
Newbie
Newbie
Posts: 4
Joined: Tue Mar 31, 2009 12:00 am

Re: Series themes?

Post by Bart » Thu Jan 28, 2010 4:50 pm

Each time user will have different number of series to show.
He might want to add some data to series 1, set its theme, then add data for series 2,
change some series settings, add data for series 3 and change its theme to something else.

Using LoadChartFromFile destroys all earlier added series. I don't want to delete them,
I want to change them.

Regards
Bart

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Series themes?

Post by Yeray » Fri Jan 29, 2010 9:08 am

Hi Bart,

You could load the tee file to a dummy chart and copy the desired series from it to the final chart:

Code: Select all

uses teestore, teeeditpro;

procedure TForm1.Button1Click(Sender: TObject);
var tmpChart: TCustomChart;
begin
  tmpChart:=TChart.Create(Self);
  LoadChartFromFile(tmpChart,'C:\tmp\teefile.tee');
  if tmpChart.SeriesCount>0 then
    tmpChart[0].ParentChart:=Chart1;

  tmpChart:=nil;
  tmpChart.free;
end;
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Bart
Newbie
Newbie
Posts: 4
Joined: Tue Mar 31, 2009 12:00 am

Re: Series themes?

Post by Bart » Thu Feb 04, 2010 8:34 am

This was a great advice!
Thanx!

Post Reply