Text Advice

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
WD_Gordon
Newbie
Newbie
Posts: 49
Joined: Wed Jun 18, 2008 12:00 am

Text Advice

Post by WD_Gordon » Wed Jan 21, 2009 3:43 pm

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

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Wed Jan 21, 2009 4:06 pm

Hi Kevin,

You could use Annotation tools for that. You'll find some examples here:

http://www.teechart.net/support/viewtop ... c&start=15
http://www.teechart.net/support/viewtopic.php?t=2665
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

WD_Gordon
Newbie
Newbie
Posts: 49
Joined: Wed Jun 18, 2008 12:00 am

Post by WD_Gordon » Wed Jan 21, 2009 4:31 pm

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

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Jan 22, 2009 10:27 am

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.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

WD_Gordon
Newbie
Newbie
Posts: 49
Joined: Wed Jun 18, 2008 12:00 am

Post by WD_Gordon » Thu Jan 22, 2009 4:52 pm

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

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Jan 23, 2009 9:41 am

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.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply