Page 1 of 1

Two annotations for cursor tool

Posted: Thu Nov 20, 2014 9:07 am
by 16568919
Currently cursor tool has only one annotation on the bottom axis. Is it possible to have two annotations one on the bottom axis and the second on the left axis?

Re: Two annotations for cursor tool

Posted: Thu Nov 20, 2014 10:55 am
by yeray
Hi Vladimir,

You can add as many TAnnotationTools as you want and calculate their position at the TColorLineTool OnDragLine event.

Re: Two annotations for cursor tool

Posted: Thu Nov 20, 2014 12:46 pm
by 16568919
Hi Yeray
I know, I can add, but as cursor tool has one X-annotation tool, for symmetry can be the second Y-annotation.

Re: Two annotations for cursor tool

Posted: Thu Nov 20, 2014 2:16 pm
by yeray
Hi Vladimir,

Sorry, I misread it and understood you were talking about the TAnnotationTool in the TColorLineTool, while you clearly mentioned it's about the TAnnotationTool on the TCursorTool.
I've added it to the public tracker:
http://bugs.teechart.net/show_bug.cgi?id=1019

Re: Two annotations for cursor tool

Posted: Fri Feb 13, 2015 3:03 pm
by 16568919
Hi Yeray
As I can this issue is not fixed yet.
Would you like to tell, how this can be fixed?

Re: Two annotations for cursor tool

Posted: Fri Feb 13, 2015 3:57 pm
by yeray
Hi Vladimir,

Note this is a feature request to be implemented, more than a bug to be fixed.
I'm afraid you are right, this hasn't been implemented yet, but since the same result can already be done without much effort with the current set of tools, I wouldn't give this a much elevated priority.

Re: Two annotations for cursor tool

Posted: Mon Feb 16, 2015 8:38 am
by 16570767
Yeray wrote:since the same result can already be done without much effort
Exactly. I did it like this:

Code: Select all

procedure TForm8.cursorToolChange(
	Sender: TCursorTool;
	x, y: Integer;
	const XValue, YValue: Double;
	Series: TChartSeries;
	ValueIndex: Integer);
begin
	annotationTool.Top := Y - (annotationTool.Height div 2);
	annotationTool.Text := YValue.ToString();
end;