Page 1 of 1

THighLowSeries with Gradient

Posted: Tue Feb 23, 2010 11:27 am
by 10054750
Hello,

I just noticed that you can fill the area between the high and low lines in a THighLow series. But it seems you can only fill it with a solid color. Is it possible to fill it with a gradient, such that the middle between the high-low is the darkest and as it approaches the high or the low it becomes lighter (or transitions to whatever the secondary gradient color is)?

Ideally there should be a few gradient options, left to right, right to left, top to bottom, bottom to top, center to outside, outside to center...

I will be happy with just center to outside :-)

If this series won't do it, is there another I can use. I have varying high-low Y values as I go across the X axis, so a horizontal bar won't work

Re: THighLowSeries with Gradient

Posted: Tue Feb 23, 2010 2:42 pm
by yeray
Hi davidnovo,

The following seems to work fine here for THighLowSeries:

Code: Select all

procedure TForm1.FormCreate(Sender: TObject);
begin
  Chart1.View3D:=false;

  Series1.FillSampleValues();
  with Series1.HighBrush do
  begin
    Style:=bsSolid;
    Gradient.Visible:=true;
    Gradient.StartColor:=clRed;
    Gradient.EndColor:=clYellow;
    Gradient.Direction:=gdTopBottom;
  end;
end;