Page 1 of 2
Attaching an annotation to a DrawLine line
Posted: Wed Apr 27, 2011 9:18 am
by 15659035
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
Re: Attaching an annotation to a DrawLine line
Posted: Wed Apr 27, 2011 11:25 am
by 10050769
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,
Re: Attaching an annotation to a DrawLine line
Posted: Wed Apr 27, 2011 11:35 am
by 15659035
Hi Sandra,
Thanks a lot for your swift reply.
I'll have a look at the links you posted.
BR
Christian
Re: Attaching an annotation to a DrawLine line
Posted: Fri Apr 29, 2011 11:08 am
by 15659035
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 (34.79 KiB) Viewed 12617 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 (16.61 KiB) Viewed 12615 times
Thanks a lot in advance
Christian
Re: Attaching an annotation to a DrawLine line
Posted: Fri Apr 29, 2011 11:10 am
by 15659035
Sorry ... I ment: "and then create a new instance of the DrawLine Tool, for each line I need."
Re: Attaching an annotation to a DrawLine line
Posted: Fri Apr 29, 2011 3:05 pm
by 15659035
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
Re: Attaching an annotation to a DrawLine line
Posted: Fri Apr 29, 2011 3:31 pm
by 10050769
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,
Re: Attaching an annotation to a DrawLine line
Posted: Mon May 02, 2011 7:27 am
by 15659035
Hi Sandra,
Sure - I've attached the same ChartingSandbox project as last time (
http://www.teechart.net/support/viewtop ... =4&t=12258)
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
Re: Attaching an annotation to a DrawLine line
Posted: Mon May 02, 2011 10:47 am
by 15659035
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
Re: Attaching an annotation to a DrawLine line
Posted: Mon May 02, 2011 3:03 pm
by 10050769
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.
Re: Attaching an annotation to a DrawLine line
Posted: Mon May 09, 2011 9:15 am
by 15659035
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
Re: Attaching an annotation to a DrawLine line
Posted: Wed May 11, 2011 2:44 pm
by 10050769
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,
Re: Attaching an annotation to a DrawLine line
Posted: Wed May 11, 2011 2:57 pm
by 15659035
Hello,
No problem.
I’m sorry, I cant upload more pictures, as a picture says more than a 1000 words.
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
Re: Attaching an annotation to a DrawLine line
Posted: Thu May 12, 2011 10:24 am
by 10050769
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,
Re: Attaching an annotation to a DrawLine line
Posted: Mon May 16, 2011 10:21 am
by 15659035
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