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

TDBChart OnGetMarkText event

edited July 2004 in General

Hi all,

When using TeeChart on a form I can use OnGetMarkText event to break
pie labels into lines like this :

procedure T....PieSeries1GetMarkText(
Sender: TChartSeries; ValueIndex: Integer; var MarkText: String);
begin
CharReplace(MarkText,' ',#13); // labels multiline !
end;

Now trying that same pie chart on a RB7 report, how can i access that
series to set event like that ?

Note I'm using D7 with RB v7.02 and TeeChart Pro v6.0.

TIA
--
Gultekin Komanli from Istanbul

Comments

  • edited July 2004
    Hi,

    The TppTeeChart class is a wrapper around the actual TeeChart component,
    which gives you access to the TeeSeries components. You will need to create
    and assign the event handlers manually in code but it is definitely
    possible. Something like the following...

    uses
    ppChrt,
    TeEngine,
    Series;

    ...

    procedure TForm1.FormCreate(Sender: TObject);
    begin
    TPieSeries(ppTeeChart1.Chart.Series[0]).OnGetMarkText := MyMarkTextEvent;
    end;

    procedure TForm1.MyMarkTextEvent(Sender: TChartSeries; ValueIndex: Integer;
    var MarkText: String);
    begin
    //Event code
    end;

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited July 2004


    That works !! Thank you.

    --
    Gultekin Komanli from Istanbul
This discussion has been closed.