Show/hide custom labels

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
cibchart
Newbie
Newbie
Posts: 9
Joined: Tue Jun 17, 2008 12:00 am

Show/hide custom labels

Post by cibchart » Mon Oct 26, 2015 8:38 am

Dear Sirs,

we are evaluating Version TeeChart Pro v2015.15.150420 32Bit VCL and have found a Problem with our existing Codebase.

We create custom labels like this:

Code: Select all

NewLabel := Chart.Axes.Bottom.Items.Add(indexMesspunktTmp, MessPunktLabelDatum);

and we are showing/hiding these labels with

Code: Select all

Chart.BottomAxis.Items[index].Format.visible := cbShowLabel.Checked;
In TeeChart Pro 8.0 VCL this works and the labels get hidden/shown.

In TeeChart Pro v2015.15.150420 32Bit VCL this does not seem to work. Is this the correct way of showing/hiding custom labels?
Is there another way of doing this?

Thanks in advance,
Gerd

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

Re: Show/hide custom labels

Post by Yeray » Wed Oct 28, 2015 1:29 pm

Hello Gerd,

I've added this to the public tracker:
http://bugs.teechart.net/show_bug.cgi?id=1358
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

cibchart
Newbie
Newbie
Posts: 9
Joined: Tue Jun 17, 2008 12:00 am

Re: Show/hide custom labels

Post by cibchart » Fri Nov 06, 2015 12:01 pm

Thanks Yeray.

In case anyone is reading this and has the same problem: as a workaround it's possible to set Label.Format.Transparency := 100; this does hide the label for me.

But now we have another Problem with custom labels: if the labels are rotated (90 degrees) and multiline then the position and size of the labels is wrong.

The position of the labels is to low and they are truncated because they are partly outside of the chart now. This can be corrected by setting Chart.BottomAxis.LabelsSize := some_value;

But I couldn't figure out how to adjust the distance between the labels and the axis (see screenshots). Any Idea how to correct that?
Attachments
3.png
rotated multiline labels have to much distance to the axis
3.png (6.97 KiB) Viewed 8889 times
2.png
rotated multiline labels have to much distance to the axis
2.png (4.54 KiB) Viewed 8896 times
1.png
rotated single line labels are near the axis
1.png (4.24 KiB) Viewed 8896 times

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

Re: Show/hide custom labels

Post by Yeray » Fri Nov 06, 2015 12:47 pm

Hello,

This one sounds exactly like this, isn't it?
http://bugs.teechart.net/show_bug.cgi?id=528
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

cibchart
Newbie
Newbie
Posts: 9
Joined: Tue Jun 17, 2008 12:00 am

Re: Show/hide custom labels

Post by cibchart » Fri Nov 06, 2015 1:17 pm

kinda... we don't use BottomAxis.DateTimeFormat, our datetime looking labels are just strings. And we don't use Axes.Bottom.Shape. But since BUG 528 is from January 2014... is there any kind of fix or workaround for this?

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

Re: Show/hide custom labels

Post by Yeray » Fri Nov 06, 2015 4:04 pm

Hello,

I'm afraid I can't tell you a workaround for that.
I've added a comment on it with some extra information.
Feel free to add your mail to the CC list on the ticket to be automatically notified when an update arrives.
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

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

Re: Show/hide custom labels

Post by Yeray » Fri Nov 13, 2015 4:45 pm

Hello,

I've split your post to a new thread here because it asks an unrelated issue.
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