Page 1 of 1
Text Advice
Posted: Wed Jan 21, 2009 3:43 pm
by 14049416
Hi,
What I am needing is to allow the user to create several text labels on a chart that is mapped to the series so that when the chart is scrolled the labels (text) move with it, just like the DrawLine tool does, where as you enable it, you can create multiple labels, place them where you want, then they move releative to the series.
Is there such a tool and if not can someone give me some advice that would help me to head in that direction?
Thanks,
Kevin
Posted: Wed Jan 21, 2009 4:06 pm
by narcis
Posted: Wed Jan 21, 2009 4:31 pm
by 14049416
Hi Narcís,
So if I wanted 4 or 5 text labels in the chart area I would have to create multiple instances of the annotation tool? There is not a collection such as the DrawLine tool has a collection of DrawLineItem items?
Also keep in mind that I have to allow the users to move the labels and change the text.
Thanks,
Kevin
Posted: Thu Jan 22, 2009 10:27 am
by narcis
Hi Kevin,
So if I wanted 4 or 5 text labels in the chart area I would have to create multiple instances of the annotation tool? There is not a collection such as the DrawLine tool has a collection of DrawLineItem items?
Yes exactly, such collection doesn't exists but you can create your own collection of Annotation tools.
Also keep in mind that I have to allow the users to move the labels and change the text.
Ok, in that case you'd better use Rectangle tools instead of Annotation tools. Their basice behaviour is the same but they also allow being dragged and edited.
Posted: Thu Jan 22, 2009 4:52 pm
by 14049416
Hi Narcís,
Okay, it appears I am heading in the right direction but I have another question. I created a quick test where I can add several RectangleTools on a candle chart. Everything looks good so far, but here is the tricky part. When I pan the chart, I would like the RectangleTools to move releative to it's position based off the current scale.
do you have any suggestions for that?
Thanks again,
Kevin
Posted: Fri Jan 23, 2009 9:41 am
by narcis
Hi Kevin,
You should set rectangle's position relative to any TeeChart object: series points, axes, legend, etc; and update them every time the chart is zoomed and scrolled. An example of this can be found
here.