Page 1 of 1

TChart Y Label

Posted: Wed Dec 03, 2008 8:59 am
by 4212704
Dear Support Group,

I am using TChart with a Bar Series (whose Style is a Label),

How can i explicity set Y Label Values to a new String value.



Thanking You

Regards

Posted: Wed Dec 03, 2008 10:07 am
by 10050769
Hello venk!

if you set Y Label to a new string value, you could doing of 2 diferents ways:

Using:

Code: Select all

Chart1.Axes.Left.LabelStyle:=talText;
This method change value of left axes for Series value, but if you interested change value of left axes for either string you could used event:

Code: Select all

procedure Chart1GetAxisLabel(Sender: TChartAxis; Series: TChartSeries;
      ValueIndex: Integer; var LabelText: String);

Best Regards
Sandra

Posted: Wed Dec 03, 2008 10:20 am
by 4212704
Thank you very much Sandra,

i now realise that they are in fact Marks and not Y Label as i noted,

sorry for formulating it wrong,

can i change the contents of Marks (Style = Label) to any arbitrary text,


Thanking you again,

Posted: Wed Dec 03, 2008 10:52 am
by 10050769
Hi venk!

Nothing happens, if you work with marks is very similar Y labels, you could used:

Code: Select all

         Series1.Marks.Style:=smsLabel;

or also you could used Marks event:

Code: Select all

procedure Series1GetMarkText(Sender: TChartSeries; ValueIndex: Integer;
      var MarkText: String);

I hope than I can resolved your problem :D


Best Regards
Sandra


[/code]

Posted: Thu Dec 04, 2008 2:40 pm
by 4212704
So i tried this today,

Thanks Sandra it works really fine,