Page 1 of 1

Show/hide custom labels

Posted: Mon Oct 26, 2015 8:38 am
by 10549401
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

Re: Show/hide custom labels

Posted: Wed Oct 28, 2015 1:29 pm
by yeray
Hello Gerd,

I've added this to the public tracker:
http://bugs.teechart.net/show_bug.cgi?id=1358

Re: Show/hide custom labels

Posted: Fri Nov 06, 2015 12:01 pm
by 10549401
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?

Re: Show/hide custom labels

Posted: Fri Nov 06, 2015 12:47 pm
by yeray
Hello,

This one sounds exactly like this, isn't it?
http://bugs.teechart.net/show_bug.cgi?id=528

Re: Show/hide custom labels

Posted: Fri Nov 06, 2015 1:17 pm
by 10549401
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?

Re: Show/hide custom labels

Posted: Fri Nov 06, 2015 4:04 pm
by yeray
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.

Re: Show/hide custom labels

Posted: Fri Nov 13, 2015 4:45 pm
by yeray
Hello,

I've split your post to a new thread here because it asks an unrelated issue.