DrawText and DrawSymbol as ChartTool available?
DrawText and DrawSymbol as ChartTool available?
BCB6 + TeeChart V6Pro.
Is DrawText and/or DrawSymbol (like DrawLine) as ChartTool available?
Is DrawText and/or DrawSymbol (like DrawLine) as ChartTool available?
Hi,
there's the Annotation Tool available to Draw Text in the Chart.
You can see some examples in the Demo Features project, included in the TeeChart Pro installation.
there's the Annotation Tool available to Draw Text in the Chart.
You can see some examples in the Demo Features project, included in the TeeChart Pro installation.
Pep Jorge
http://support.steema.com
http://support.steema.com
Hi, Wiebe.
Yes, but only if you "hard code" the annotation coordinate by using specific screen pixel coordinate. If you on the other hand, transform real (axis) value to screen coordinate before you position annotation (and do this in one of the chart's events), then the annotation will move as you scroll/zoom. The idea is to:
1) Get mouse position, expressed in real axis values
2) Store this position
3) Transform this position to screen pixels
4) Position annotation tool according to transformed value
5) Do #4 and #5 each time you zoom or scroll chart i.e. place the code in one of the chart events.
Perhaps this is something we could include as built-in feature for next version. I'll log it to the wish list.
Yes, but only if you "hard code" the annotation coordinate by using specific screen pixel coordinate. If you on the other hand, transform real (axis) value to screen coordinate before you position annotation (and do this in one of the chart's events), then the annotation will move as you scroll/zoom. The idea is to:
1) Get mouse position, expressed in real axis values
2) Store this position
3) Transform this position to screen pixels
4) Position annotation tool according to transformed value
5) Do #4 and #5 each time you zoom or scroll chart i.e. place the code in one of the chart events.
This is not problematic. You can add multuple annotation tools at runtime via code. The missing feature is the drag/drop functionality for annotation tools. But with some extra coding I think it can be done. You could use Tchart OnMouseDown, onMouseMove and OnMouseUp events together with annotation tool Clicked method to do the drag&drop.However I meant a Text/SymbolBox Tool, to be created on the fly by the user,
Perhaps this is something we could include as built-in feature for next version. I'll log it to the wish list.
Marjan Slatinek,
http://www.steema.com
http://www.steema.com
Hi Marjan,
Thanks to your suggestion, repositioning while scrolling works fine now. However Zooming and Dragging do conflict. Primarily because switching Zoom on/off under program control does not seem to work. Manipulating Chart->Zoom->Allow does not affect the behaviour set at designtime.
Any additional suggestion?
Thanks to your suggestion, repositioning while scrolling works fine now. However Zooming and Dragging do conflict. Primarily because switching Zoom on/off under program control does not seem to work. Manipulating Chart->Zoom->Allow does not affect the behaviour set at designtime.
Any additional suggestion?
Meanwhile - through other forum items on the subject - I noticed, that apart from Chart->Zoom->Allow, also Chart->CancelMouse seems to play a (mysterious) role in controlling Zoom actions. Just by brute trial and error I managed to "solve" 50% of the Drag/Zoom collision problems.
However I cannot see any logic as to how to control this Zoom business at run time.
Pls advice.
However I cannot see any logic as to how to control this Zoom business at run time.
Pls advice.
How to control Zoom at runtime
Any follow up, in particular as to how to control this Zoom business at run time, is still appreciated.