Page 1 of 1

Turn on/off gradient for pie/bar chart programmatically

Posted: Tue May 23, 2006 7:44 pm
by 9345103
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!

Posted: Wed May 24, 2006 7:57 am
by narcis
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;