Turn on/off gradient for pie/bar chart programmatically

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Wayne
Newbie
Newbie
Posts: 7
Joined: Fri Jan 27, 2006 12:00 am

Turn on/off gradient for pie/bar chart programmatically

Post by Wayne » Tue May 23, 2006 7:44 pm

Hi,

I would like to be able to turn on/off gradient for bar/pie chart programmatically. I had gradient turn on by default and try the follow to turn it off.

ppDPTeeChart1.Chart.Gradient.Visible :=false;
ppDPTeeChart1.Chart.Legend.Gradient.Visible :=false;

This seems to have no effect. I am doing this with ReportBuilder and TeeChart 7.0.

Am I missing something? Any idea?

thanks in advance!

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 May 24, 2006 7:57 am

Hi Wayne,

For a TBarSeries you should do:

Code: Select all

procedure TForm1.Button1Click(Sender: TObject);
begin
  Series1.BarStyle:=bsRectangle;
  Chart1.Legend.Gradient.Visible:=false;
end;
And for a TPieSeries would be:

Code: Select all

procedure TForm1.Button1Click(Sender: TObject);
begin
  Series1.Gradient.Visible:=false;
  Chart1.Legend.Gradient.Visible:=false;
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
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply