TeeChart OnGetLegendText Event

Is there a way to use the OnGetLegendText event of a TeeChart object within Fast Reports? I wish to be able to reformat the items within the legend.

I am building the report at runtime, and I declare a function for the OnGetLegendText event such as the following

procedure TRepModule.ChartGetLegendText(Sender: TCustomAxisPanel; LegendStyle: TLegendStyle; Index: Integer; var LegendText: String);
begin
// This text is for testing purposes
LegendText := 'BLAH '+IntToStr(Index);
end;

which I then assign to the OnGetLegendText event

Chart1.Chart.OnGetLegendText := ChartGetLegendText;

Now the report compiles and runs fine, and the chart is displayed, however the event never gets triggered so the text in the legend never gets formatted as I require.

Is this the correct way to approach this issue or is there another way I can format the text in the legend?

Troy.

Comments

Leave a Comment