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

Multiple legend

edited June 2002 in General
Hi,

How do we show multiple legend in the same chart in report builder ?
It can be done in TeeChart's OnAfterDraw event.
There's only OnPrint event in report builder, and I tried to use the same
code, but only one legend shown.

Here's the code:

With ppDPTeeChart1.Chart.Legend do
begin
Series := ppDPTeeChart1.Chart.Series[1];
DrawLegend;
CustomPosition := False;
Series := ppDPTeeChart1.Chart.Series[0];;
end;

Anyway, I copied this code from teechart example (Legend_Multi).


Thanks,
Karnel

Comments

  • edited June 2002
    You can get to the AfterDrawEvent by assigning the event handler in code:

    ...
    private
    procedure AfterDrawEvent(Sender: TObject);
    ...
    end;

    implementation

    procedure TForm1.FormCreate(Sender: TObject);
    begin
    ppTeeChart1.Chart.OnAfterDraw := AfterDrawEvent;
    end;

    procedure TForm1.AfterDrawEvent(Sender: TObject);
    begin
    {do stuff}
    end;


    --
    Cheers,

    Jim Bennett
    Digital Metaphors

  • edited June 2002
    I've tried it, and it works.
    Many thanks, Jim.
    Really appreciate your support to this newsgroup.

    Regards,
    Karnel


This discussion has been closed.