TAnnotationTool Update Problem
Posted: Mon Dec 10, 2012 12:55 pm
hi, I have a chart with some TannotationTools on it. When i draw the chart the first time the annotations are in the correct position, when i zoom the chart the annotation are "one step back". I use the chart onafterdraw event to update the annotation position.
In the attached image you can see an example of that i obtain.
Another problem is that in the onafterdraw event i set the label for the annotation but i don't have access (the size is 1) to the size of the annotation next in the event.
i.e.:
procedure TFMain.DBChart1AfterDraw(Sender: TObject);
begin
AnnotationTool.Text := 'Some text';
AnnotationTool.Visible := True;
// here AnnotationTool.Width is 1
[...]
end;
Any idea to solve the problem?
In the attached image you can see an example of that i obtain.
Another problem is that in the onafterdraw event i set the label for the annotation but i don't have access (the size is 1) to the size of the annotation next in the event.
i.e.:
procedure TFMain.DBChart1AfterDraw(Sender: TObject);
begin
AnnotationTool.Text := 'Some text';
AnnotationTool.Visible := True;
// here AnnotationTool.Width is 1
[...]
end;
Any idea to solve the problem?