Probably a simple question:
Is there an easy wey to write a background text behind the Chart grid?
I could not find this in the help..
Many thanks for any help!
MF
Chart background text
Re: Chart background text
Hello,
Yes, you could draw your text at OnBeforeDrawAxes event. For example:
Yes, you could draw your text at OnBeforeDrawAxes event. For example:
Code: Select all
uses Series;
procedure TForm1.Chart1BeforeDrawAxes(Sender: TObject);
begin
with Chart1.Canvas do
begin
Font.Size:=50;
Brush.Style:=bsClear;
TextOut(50,50,'My text');
end;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
Chart1.View3D:=false;
Chart1.Legend.Visible:=false;
Chart1.AddSeries(TLineSeries).FillSampleValues();
Chart1.Axes.Left.Grid.Width:=5;
Chart1.Axes.Left.Grid.Style:=psSolid;
Chart1.Axes.Left.Grid.Color:=clRed;
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |