TLineSeries area gradient
Posted: Mon Jan 28, 2013 4:20 pm
Using TeeChart Pro v8.06.60902 VCL with Delphi 2010. On a form with just a default TChart component, I have the following code:
which gives me the following:
Using TeeChart Pro v2012 Build 2012.07.121105 VCL with Delphi XE3. The same code give me:
No gradient is applied and even the gradient color is ignored. I am not sure if that's a bug but in any case the behaviour has changed.
I saw that in the latest TeeChart Pro TLineSeries has an AreaChartBrush property which I using in the following way: but the gradiant balance is changing for each point area which is different from what I had before.
How can I get back my old behaviour as in my first screenshot?
Code: Select all
procedure TForm1.FormCreate(Sender: TObject);
var
LLineSeries: TLineSeries;
begin
Chart1.View3D := false;
LLineSeries := TLineSeries.Create(Self);
LLineSeries.DrawArea := true;
LLineSeries.Gradient.StartColor := clWhite;
LLineSeries.Gradient.EndColor := clFuchsia;
LLineSeries.Gradient.Visible := true;
LLineSeries.AddXY(1,2);
LLineSeries.AddXY(2,4);
LLineSeries.AddXY(3,6);
LLineSeries.AddXY(4,9);
LLineSeries.AddXY(5,4);
LLineSeries.AddXY(6,11);
LLineSeries.AddXY(7,7);
LLineSeries.AddXY(8,8);
LLineSeries.AddXY(9,9);
LLineSeries.AddXY(10,6);
Chart1.AddSeries(LLineSeries);
end;
I saw that in the latest TeeChart Pro TLineSeries has an AreaChartBrush property which I using in the following way: but the gradiant balance is changing for each point area which is different from what I had before.
How can I get back my old behaviour as in my first screenshot?