Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Items drawn on TeeChart canvas not shown in report

edited August 2011 in General
I want to draw some additional lines in the chart in the
OnBeforeDrawSeries event. How to manage that these lines (circles, text)
on canvas of TeeChart are shown in the report ?

Axel



--- posted by geoForum on http://www.newswhat.com

Comments

  • edited August 2011
    Axel,

    In my quick testing items drawn to the TeeChart canvas did show up on
    the report. Below is the code I used to display a rectangle on a chart...

    procedure TForm1.eh_ChartBeforeDrawSeries(Sender: TObject);
    begin
    ppTeeChart1.Chart.Canvas.Pen.Color := clRed;
    ppTeeChart1.Chart.Canvas.Pen.Width := 3;
    ppTeeChart1.Chart.Canvas.RectangleY(10, 10, 60, 60, 10);

    end;

    procedure TForm1.FormCreate(Sender: TObject);
    begin
    ppTeeChart1.Chart.OnBeforeDrawSeries := eh_ChartBeforeDrawSeries;

    end;

    procedure TForm1.Button1Click(Sender: TObject);
    begin
    ppReport1.Print;

    end;

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.