ColorEachPoint and Gradient?
Posted: Mon Aug 20, 2012 8:33 pm
Hello, is it possible to use BarSeries.ColorEachPoint and have a gradient?
Thanks.
Thanks.
Steema Software - Customer Support Forums
http://216.92.101.67/support/
Code: Select all
with Chart1.AddSeries(TBarSeries) as TBarSeries do
begin
FillSampleValues;
ColorEachPoint:=true;
BarStyle:=bsRectGradient;
end;
Code: Select all
if series.ColorEachPoint then
if y < y0 then
color := clRed
else
color := clGreen
else
color := clDefault;
series.AddXY(x, y, '', color);
You should set the series' Gradient.StartColor property.Jim Green wrote:Where would you supply the 2nd color for the gradient?
Code: Select all
Procedure TForm1.GetBarStyle(Sender:TCustomBarSeries; ValueIndex:Integer; var TheBarStyle:TBarStyle);
begin
Sender.Gradient.StartColor:=ApplyBright(Sender.ValueColor[ValueIndex], 128);
end;