Custom axis label disappearing

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
rtech
Newbie
Newbie
Posts: 1
Joined: Thu Mar 29, 2018 12:00 am

Custom axis label disappearing

Post by rtech » Tue Jan 22, 2019 11:19 am

Hello, I work with RadStudio 10.2 and Teechart 2018.25

I have custom axis on my chart. If i set left axis visible property to false, my custom axis label also disappeared.
I've attached tee file to this topic. You can reproduce this behaviour, by setting Left Axis visible property to false in Teechart Office.
Attachments
test.7z
(2.4 KiB) Downloaded 688 times

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

Re: Custom axis label disappearing

Post by Yeray » Thu Jan 24, 2019 9:25 am

Hello,

This happens because the CustomAxes don't "inflate" the chartRect like the default axes. You can workaround this setting some extra margin. Ie:

Code: Select all

procedure TForm1.CheckBox1Click(Sender: TObject);
begin
  Chart1.Axes.Left.Visible:=CheckBox1.Checked;

  if Chart1.Axes.Left.Visible then
     Chart1.MarginLeft:=16
  else
     Chart1.MarginLeft:=66;
end;
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