Assistance Using Themes
Posted: 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
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
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]);
Thanks Rick Anderson