TChart Y Label

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
venk
Newbie
Newbie
Posts: 3
Joined: Fri Nov 15, 2002 12:00 am

TChart Y Label

Post by venk » Wed Dec 03, 2008 8:59 am

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

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Post by Sandra » Wed Dec 03, 2008 10:07 am

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

venk
Newbie
Newbie
Posts: 3
Joined: Fri Nov 15, 2002 12:00 am

Post by venk » Wed Dec 03, 2008 10:20 am

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,

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Post by Sandra » Wed Dec 03, 2008 10:52 am

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]

venk
Newbie
Newbie
Posts: 3
Joined: Fri Nov 15, 2002 12:00 am

Post by venk » Thu Dec 04, 2008 2:40 pm

So i tried this today,

Thanks Sandra it works really fine,

Post Reply