Getting at Series in TppTeeChart...
I have a TeeChart on my report. Unfortunately, working with a TeeChart on a
ReportBuilder report is very different from working with them on a form. For
example, I cannot view Series properties in the object inspector. At least,
I don't think I can. Can I? If yes, how? If no, then how do set up code for
a series event? For example, let's say I wanted code like following for the
OnGetMarkText event of Series1:
procedure TForm1.Series1GetMarkText(Sender: TChartSeries;
ValueIndex: Integer; var MarkText: String);
begin
if (Sender = Chart1.Series[0]) and (ValueIndex = 4)
then
else MarkText := ''; // hide everything else
end;
How would I do this?
NOTE: I am using Delphi 6 SP2 and Reportbuilder Enterprise 6.03.
ReportBuilder report is very different from working with them on a form. For
example, I cannot view Series properties in the object inspector. At least,
I don't think I can. Can I? If yes, how? If no, then how do set up code for
a series event? For example, let's say I wanted code like following for the
OnGetMarkText event of Series1:
procedure TForm1.Series1GetMarkText(Sender: TChartSeries;
ValueIndex: Integer; var MarkText: String);
begin
if (Sender = Chart1.Series[0]) and (ValueIndex = 4)
then
else MarkText := ''; // hide everything else
end;
How would I do this?
NOTE: I am using Delphi 6 SP2 and Reportbuilder Enterprise 6.03.
This discussion has been closed.
Comments
assign the event handler in code at runtime.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
in my previous post? Like, would the procedure declaration be
procedure TForm1.TppTeeChart1.Series1GetMarkText(Sender: TChartSeries;
ValueIndex: Integer; var MarkText: String);
and then I'd have code somewhere, like in OnPrint of the Chart, like:
TppTeeChart1.Series[0].OnGetMarkText := Series1GetMarkText;
In other words, could you give sample code for creating an event procedure
and then hooking up the event to the procedure?
This is really a pain, if I'm understanding this correctly. For one thing,
one has to know procedure parameters for the events in order to even create
the procedure declaration, etc..
like hooking into a public event on an object. The object will trigger the
event, you just need to 'listen' for it. The object (series in this case)
will determine if it has been assigned the method pointer and call your
method. The following is an example you asked for:
http://www.digital-metaphors.com/tips/TeeChartSeriesEventHandler.zip
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com