Assistance Using Themes

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
RichardAnderson
Newbie
Newbie
Posts: 2
Joined: Wed Mar 10, 2004 5:00 am

Assistance Using Themes

Post by RichardAnderson » Fri Oct 30, 2009 3:16 pm

I am using Delphi 7 (Build 8.1) and TChart 7.07. I have an application that uses many charts (it was created in 2005) and recently a customer asked about getting charts that look more "Officeish". I noticed that the Chart Dialog has a Themes tab but I would like to be able to apply the themes programmatically. I read the short section in the Help and I didn't quite understand the example.

Here is a sample of some of the code in the FormShow event

Code: Select all

var
  Total         : currency;
begin
  Total :=  dbchrtSummaryBusinessSegments.GetASeries.ValuesList[1].Total;

  // Set the titles for the pie graphs
  dbchrtProgramSegments.Title.Text[1]         :=  Format('%9.0m',[Total]);
  dbchrtMAJCOMBusinessSegments.Title.Text[1]  :=  Format('%9.0m',[Total]);

  dbchrtBaseBusinessSegments.SubTitle.Text[0] :=  '(For ' + GraphCaption + ')';
  dbchrtProgramMAJCOMSegments.Title.Text[1]   :=  Format('%9.0m',
          [dbchrtProgramMAJCOMSegments.GetASeries.ValuesList[1].Total]);
I was thinking one would only need to do dbchrtBaseBusinessSegments.Theme[x].Apply but that doesn't work. Can someone give me an example of how to apply themes to an existing chart. I wanted to give the user the ability to change the applied theme.

Thanks Rick Anderson

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

Re: Assistance Using Themes

Post by Narcís » Mon Nov 02, 2009 1:00 pm

Hi Rick,

Yes, there's and example of this at What's New?\Welcome!\Themes\Chart Themes in the new features demo available at TeeChart's program group. Also notice that latest v7 release available at the client download area is v7.12.

Hope this helps!
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