How to set custom label items texts ??

TeeChart FireMonkey (Windows,OSX,iOS & Android) for Embarcadero RAD Studio, Delphi and C++ Builder (XE5+)
Post Reply
BugTrapper
Newbie
Newbie
Posts: 5
Joined: Mon Mar 07, 2016 12:00 am

How to set custom label items texts ??

Post by BugTrapper » Thu Mar 10, 2016 5:43 pm

For testing purposes I wanted to change the label texts of TChart bottom axis to custom ones, so I wrote this code, but
that didn't change the bottom labels in any way ?? What could be wrong here ??

Code: Select all

procedure TFormVertikale.Chart1BeforeDrawAxes(Sender: TObject);
var
  chart: TChart;
  AxisItem: TAxisItem;
  i: integer;
begin
  chart:=TChart(Sender);
  for i := 0 to chart.Axes.Bottom.Items.Count-1 do
  begin
    AxisItem:=chart.Axes.Bottom.Items[i];
    AxisItem.Text:='5';
  end;
end;
Thx in advance.

Yeray
Site Admin
Site Admin
Posts: 9614
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: How to set custom label items texts ??

Post by Yeray » Fri Mar 11, 2016 4:11 pm

Hello,

Have you tried at OnGetAxisLabel event?
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

BugTrapper
Newbie
Newbie
Posts: 5
Joined: Mon Mar 07, 2016 12:00 am

Re: How to set custom label items texts ??

Post by BugTrapper » Sat Mar 12, 2016 10:59 am

Yes, in event OnGetAxisLabel() I can change my axis labels without any problems :o)

You are right :o)

Can you help me also with the panning issue, it is a RAD Studio problem, or a TeeChart problem ?
I want to write my own Pan handler with Gestures.

Thank you very much.

Yeray
Site Admin
Site Admin
Posts: 9614
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: How to set custom label items texts ??

Post by Yeray » Mon Mar 14, 2016 3:52 pm

Hello,
BugTrapper wrote:Yes, in event OnGetAxisLabel() I can change my axis labels without any problems :o)

You are right :o)
Great!
BugTrapper wrote:Can you help me also with the panning issue, it is a RAD Studio problem, or a TeeChart problem ?
I want to write my own Pan handler with Gestures.
Please, let's continue the conversation at the according thread:
http://www.teechart.net/support/viewtop ... 021#p71021
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply