How to make a gradient fill
Posted: Tue Jul 19, 2016 4:42 am
I'm drawing rectangles on a chart in the OnBeforeDrawSeries event. To draw a rectangle with a solid fill, I define a brush with (for example)
Chart1.Canvas.Brush.Color:=clRed;
and then draw a rectangle in the OnBeforeDrawSeries event with (for example)
Chart1.Canvas.Rectangle(X0,Y0,X1,Y1).
If I want a gradient fill in the rectangle, say clRed at the top right and clYellow at the bottom left, how would I achieve that?
I'm using the latest TeeChart Pro for VCL. Thank you.
Chart1.Canvas.Brush.Color:=clRed;
and then draw a rectangle in the OnBeforeDrawSeries event with (for example)
Chart1.Canvas.Rectangle(X0,Y0,X1,Y1).
If I want a gradient fill in the rectangle, say clRed at the top right and clYellow at the bottom left, how would I achieve that?
I'm using the latest TeeChart Pro for VCL. Thank you.