Jump to content
Software FX Community

GetLegend event doesn't work (delphi 4)


User (Legacy)

Recommended Posts

I need the numbers shown in Y axis legend converted to currency format. I 

thought that GetLegend event handler is the right place to do that, but

following code doesn't work. Handler is properly called, but changing hText

parameter value has no effect on the chart. I'm using Delphi 4C/S and

ChartFX 2.0.0 (as shown in 'About' dialog). Any help?

somewhere in the initialization code:

...

chart.XLegType := CL_GETLEGEND;

...

procedure TMaskeAnalyse.chartGetLegend(Sender: TObject; nType: Smallint;

var nRes: Smallint);

var

v : real;

s : string;

begin

v := StrToFloat(chart.HText);

s := FloatToStrF(v, ffNumber, 14, 2);

chart.HText := s;

chart.ReturnValue := 1; //undocumented, doesn't help anyway..

nRes:= 1;

end;

thanks

--

Kristof

bengal *at* o2.pl

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...