Attaching an annotation to a DrawLine line

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
CKBN
Newbie
Newbie
Posts: 21
Joined: Mon Apr 11, 2011 12:00 am

Attaching an annotation to a DrawLine line

Post by CKBN » Wed Apr 27, 2011 9:18 am

Hi,

Using the DrawLine tool, is there any way to distinguish which line has been selected, dragged ect. My problem is that I would like to attach an annotation to the starting point of each line drawen (doing this in the NewLine event), and if I understand it correctly, you create only one DrawLine tool, and then using that tool draws all the line you would like, right?

Thanks a lot in advance
Christian

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Attaching an annotation to a DrawLine line

Post by Sandra » Wed Apr 27, 2011 11:25 am

Hello Christian,
Using the DrawLine tool, is there any way to distinguish which line has been selected, dragged ect.
I recommend you use DrawLineItems that allow distinguish which line has been selected. You can find an example here where explain how you must use DrawLineItems.

On the other hand, I think that you can take a look in this link when you want draw and drag the annotation tools, I believe can serve of help.

I hope will helps.

Thanks,
Best Regards,
Sandra Pazos / 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

CKBN
Newbie
Newbie
Posts: 21
Joined: Mon Apr 11, 2011 12:00 am

Re: Attaching an annotation to a DrawLine line

Post by CKBN » Wed Apr 27, 2011 11:35 am

Hi Sandra,

Thanks a lot for your swift reply.
I'll have a look at the links you posted.

BR
Christian

CKBN
Newbie
Newbie
Posts: 21
Joined: Mon Apr 11, 2011 12:00 am

Re: Attaching an annotation to a DrawLine line

Post by CKBN » Fri Apr 29, 2011 11:08 am

Hi again,
I found another workaround – in the NewLine event I set the sender.EnableDraw = false, and then create a new instance for each line I need.
Anyway – now I got another problem I can’t seem to figure out.
I would like the lines to be rather wide (10pix), resulting in that the ‘selecting points’ (I guess these are called Start- and EndHandles?) gets rather large (please see picture below).
DrawLine1.jpg
DrawLine1.jpg (34.79 KiB) Viewed 12609 times
Is the any way that I can set the size of these, or hide them, or ... (see next picture), makeing it look nicer? I know this is a rather dump question, but I just can’t figure it out.
DrawLine2.jpg
DrawLine2.jpg (16.61 KiB) Viewed 12607 times
Thanks a lot in advance
Christian

CKBN
Newbie
Newbie
Posts: 21
Joined: Mon Apr 11, 2011 12:00 am

Re: Attaching an annotation to a DrawLine line

Post by CKBN » Fri Apr 29, 2011 11:10 am

Sorry ... I ment: "and then create a new instance of the DrawLine Tool, for each line I need."

CKBN
Newbie
Newbie
Posts: 21
Joined: Mon Apr 11, 2011 12:00 am

Re: Attaching an annotation to a DrawLine line

Post by CKBN » Fri Apr 29, 2011 3:05 pm

Ohh … and one more question:
When I do a zoom, it doesn’t seems like that DrawLine From- and ToPoint gets updated. Is this a bug or am I doing something wrong/making the wrong assumptions?

Again thanks in advance.

/Christian

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Attaching an annotation to a DrawLine line

Post by Sandra » Fri Apr 29, 2011 3:31 pm

Hello Christian,

Could you send us a simple project because we can reproduce exactly your problem here and we can try to find a solution for this?

Thanks,
Best Regards,
Sandra Pazos / 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

CKBN
Newbie
Newbie
Posts: 21
Joined: Mon Apr 11, 2011 12:00 am

Re: Attaching an annotation to a DrawLine line

Post by CKBN » Mon May 02, 2011 7:27 am

Hi Sandra,

Sure - I've attached the same ChartingSandbox project as last time (http://www.teechart.net/support/viewtop ... =4&t=12258) :D
Just add your TeeChart.dll to the .. \ChartingSandbox\Ellab.Charting\DLL folder and it should build and run. Please let me know it you have any problems.
When running the app, click the "Add DrawLine" button, and draw a line on the chart.

Again - thanks a lot in advance.

/Christian
Attachments
ChartingSandbox.zip
(97.47 KiB) Downloaded 429 times

CKBN
Newbie
Newbie
Posts: 21
Joined: Mon Apr 11, 2011 12:00 am

Re: Attaching an annotation to a DrawLine line

Post by CKBN » Mon May 02, 2011 10:47 am

Hi again Sandra,

I just realized that Annotation has a Callout property that will solve my problems.
Only thing is that the arrow points the wrong way.
Is there any way to invert the arrow, so it points away from the annotation?

Thanks
Christian

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Attaching an annotation to a DrawLine line

Post by Sandra » Mon May 02, 2011 3:03 pm

Hello Christian,

I am glad that you can find a solution for your first problem. About callout question I think you can use the property of Annotation Callout Style to change Callout headers style as do in next line of code:

Code: Select all

  annotation1.Callout.Style = Steema.TeeChart.Styles.PointerStyles.DownTriangle;
And also, I think you can take a look in Demo project concretely in the example All Features\Welcome !\Tools\Annotation\Annotation Callout.

I hope will helps.
Best Regards,
Sandra Pazos / 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

CKBN
Newbie
Newbie
Posts: 21
Joined: Mon Apr 11, 2011 12:00 am

Re: Attaching an annotation to a DrawLine line

Post by CKBN » Mon May 09, 2011 9:15 am

Hallo Sandra,

Sorry for not making myself clear. I was wounding if there were any way to make the Annotation.Callout arrow point at the selected point instead of the selected point instead of the Annotation itself. So something like in my post from "29 Apr 2011 11:08", pic: DrawLine2.jpg.


Thanks
Christian

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Attaching an annotation to a DrawLine line

Post by Sandra » Wed May 11, 2011 2:44 pm

Hello Christian,

Sorry for the delay. I have tried to do what you want, but I don't understand well you want achieve. Please could you explain step-to-step that you want to achive annotation tool do?

Thanks,
Best Regards,
Sandra Pazos / 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

CKBN
Newbie
Newbie
Posts: 21
Joined: Mon Apr 11, 2011 12:00 am

Re: Attaching an annotation to a DrawLine line

Post by CKBN » Wed May 11, 2011 2:57 pm

Hello,

No problem.
I’m sorry, I cant upload more pictures, as a picture says more than a 1000 words. :D
But anyway – I’ll try to explain as well as I can.

At the moment the annotation callout points at the annotation textbox. So the arrow points from a point on the graph to the textbox.

What I would like the callout to do, is to points from the textbox, to a point on the graph. Kind of like the picture from my post "29 Apr 2011 11:08", pic: DrawLine2.jpg.

Kind of simple right? And its properly me being unable to see the wood from all the trees, but I just cant seems to figure it out.

Again thanks in advance
Christian

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Attaching an annotation to a DrawLine line

Post by Sandra » Thu May 12, 2011 10:24 am

Hello CKBN,

Thanks for your information :). Please,could you take a look again in demo project the example All Features\Welcome !\Tools\Annotation\Annotation Callout and confirm us if it works as you expected? On the other hand, as annotation1.Callout.XPosition, annotation1.Callout.YPosition and annotation1.Callout.ZPosition works with pixels and if you prefer, you can use Mouse Events as MouseMove and assign the pixels to positions of callout of annotation tool.

Thanks,
Best Regards,
Sandra Pazos / 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

CKBN
Newbie
Newbie
Posts: 21
Joined: Mon Apr 11, 2011 12:00 am

Re: Attaching an annotation to a DrawLine line

Post by CKBN » Mon May 16, 2011 10:21 am

Hi Sandra,

Thanks for your reply. Could you please have a look at the attached project, by adding the TeeChart.dll to the ..\TeeChartSandbox\TeeChartSandbox\DLL folder.

When I click somewhere inside the chart an arrow appears pointing from the point I click to the annotation label.
I would like the arrow to point from the annotation label to the point I click.
Is this possible, and if so - how do achieve this?

Thanks a lot in advance.
Christian
Attachments
TeeChartSandbox.zip
(16.48 KiB) Downloaded 387 times

Post Reply