I'm not sure what you are trying to do but is the property tchart.leftaxis.axislabelstyle relevant?


On Thu, 10 Jul 2003 15:12:40 +1200, Tracey Maule <[EMAIL PROTECTED]> wrote:


cheers for setting me straight there guys. Ive got it compiling, but it doesnt seem to do anything ( i still see my value's title in the axis labels)

Does anyone know how to dynamically change these labels???

----- Original Message ----- From: Todd Martin To: Multiple recipients of list delphi Sent: Thursday, July 10, 2003 2:41 PM
Subject: Re: [DUG]: TChart Set LeftAxis Labels



Hi Tracey


You're passing a constant string expression ('any old string') to GetAxisLabel() which expects a variable.

Try this
var
AxisLabel : String;
begin
GetAxisLabel(LeftAxis, HorizBarSeries, 1,AxisLabel);
ShowMessage('The label axis is ' + AxisLabel);
end;

Todd.
----- Original Message ----- From: Tracey Maule To: Multiple recipients of list delphi Sent: Thursday, July 10, 2003 2:08 PM
Subject: [DUG]: TChart Set LeftAxis Labels



Hi


I have dynamically created a Chart, with 3 HorizBarSeries which are mbStacked.

What I now need to figure out is how to set the Left Axis labels to display the contents of another field returned by my query for that record.

does anyone know how to do this without affecting the data values?

The closest i have come to success so far is:

procedure GetAxisLabel(Sender: TChartAxis;
Series: TChartSeries; ValueIndex: Integer; var LabelText: string);
begin
if Sender = FChart.LeftAxis then
if ValueIndex < 1 then
LabelText := ''
else
LabelText := IBQuery1.FieldByName('system').AsString;
end;


WebActionWhatever; begin stuff GetAxisLabel(LeftAxis, HorizBarSeries, 1, 'any old string'); end;

But I keep getting a compile error : constant object cannot be passed as a var parameter.

Anyone here know how to acheive this??

Tracey
Software Developer / Web Master
Logis
[EMAIL PROTECTED]
(025) 213-1065





--


---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/

Reply via email to