Margins for Annotation

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
moelski
Newbie
Newbie
Posts: 92
Joined: Tue Jun 19, 2007 12:00 am
Contact:

Margins for Annotation

Post by moelski » Thu Oct 22, 2009 11:48 am

Hi !

I really miss a feature for the annotations - margins.

If you set the position you can only choose an Auto mode like "Right top" Left top" ... or you choose "Custom".
In most cases the Auto selection is ok, but it would be great to set some margins even if it is set to auto mode.

I know it is possible to control the position of the annotation manually, but it would be nicer if this could be done by TChart directly.

So what do you think about that suggestion?

Greetz Dominik

Yeray
Site Admin
Site Admin
Posts: 9602
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Margins for Annotation

Post by Yeray » Thu Oct 22, 2009 2:15 pm

Hi Dominik,

I'll add this to the wish list but (TV52014508), as you know, this is quite easy to do manually. For example:

Code: Select all

uses teetools;

var annotation1: TAnnotationTool;

procedure TForm1.FormCreate(Sender: TObject);
begin
  annotation1:=Chart1.Tools.Add(TAnnotationTool.Create(self)) as TAnnotationTool;
  annotation1.Position:=ppLeftTop;
  annotation1.Text:='Annotation with margin';
end;

procedure TForm1.Button1Click(Sender: TObject);
var LeftMargin, TopMargin, tmpLeft, tmpTop: Integer;
begin
  LeftMargin:=10;
  TopMargin:=10;
  tmpLeft:=annotation1.Bounds.Left;
  tmpTop:=annotation1.Bounds.Top;
  annotation1.PositionUnits:=muPixels;
  annotation1.Shape.Left:=tmpLeft+LeftMargin;
  annotation1.Shape.Top:=tmpTop+TopMargin;
end;
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

moelski
Newbie
Newbie
Posts: 92
Joined: Tue Jun 19, 2007 12:00 am
Contact:

Re: Margins for Annotation

Post by moelski » Fri Oct 23, 2009 5:53 am

Hi Yeray,
this is quite easy to do manually
For sure. This is an easy task.

But we have one problem ... We store the TEE file in a Stream. If we load it back the values for the margins are gone:

Code: Select all

  LeftMargin:=10;
  TopMargin:=10;
We had to store this information by ourself.

And on the other side we got the same "problem" after loading. We have to read the values and set the margins to a new value.
Another probloem is while resizing the chart. We have to manually control all the positions of annotations.

So there are a lot of things to do which will better done by TChart itself.

Yeray
Site Admin
Site Admin
Posts: 9602
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Margins for Annotation

Post by Yeray » Fri Oct 23, 2009 8:03 am

Hi Dominik,

Yes, I understand that's annoying to do this job manually. I only wanted to clarify that there is a way to do it while it's not included in TeeChart sources.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

moelski
Newbie
Newbie
Posts: 92
Joined: Tue Jun 19, 2007 12:00 am
Contact:

Re: Margins for Annotation

Post by moelski » Fri Oct 23, 2009 8:11 am

Hi Yeray,
I only wanted to clarify that there is a way
Ok. Thx
while it's not included in TeeChart sources
Could you imagine when it will be included? I think it´s not such a hugh change in the sources.
But many other tools (like rectangle) will profit from that.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: Margins for Annotation

Post by Narcís » Fri Oct 23, 2009 8:56 am

Hi moelski,
Could you imagine when it will be included?


Sorry but we are not able to provide an estimate date for now. However, I'm pretty sure that if it's implemented it won't be in v8 but in next major release. Please be aware at this forum or subscribe to our RSS news feed for new release announcements and what's implemented on them.
I think it´s not such a hugh change in the sources.
But many other tools (like rectangle) will profit from that.
Probably not but this is quite a specific need which anybody else requested so far. You must understand we have to give feature requests a priority level considering the general interests of TeeChart users among other criterion. Being a source code customer also gives you the option to customize sources to fit your exact needs.
Best Regards,
Narcís Calvet / 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

Post Reply