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

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.