Tool Data Table

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Calou
Advanced
Posts: 104
Joined: Wed Nov 19, 2008 12:00 am

Tool Data Table

Post by Calou » Tue Oct 13, 2009 8:53 am

Hello,

I have problem with DataTable

Here are the pictures:
http://www.cijoint.fr/cjlink.php?file=c ... th66PH.jpg
http://www.cijoint.fr/cjlink.php?file=c ... DXAunS.jpg

With the datatable there is no mars month.

I don't understand why :oops:

Thanks for help

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

Re: Tool Data Table

Post by Narcís » Tue Oct 13, 2009 2:36 pm

Hi Calou,

I could reproduce this one. Basically TDataTableTool requires more space to plot than axes labels and this issue depends on chart's width. I've added your request to the wish-list to be enhanced for future releases (TV52014476).
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

Calou
Advanced
Posts: 104
Joined: Wed Nov 19, 2008 12:00 am

Re: Tool Data Table

Post by Calou » Fri Nov 20, 2009 1:45 pm

Hello,

Do you know when the update version of Tchar will include this modification?

Thanks

Regards

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

Re: Tool Data Table

Post by Yeray » Fri Nov 20, 2009 3:38 pm

Hi Calou,

I'm afraid that I can't tell you a date for this to be enhanced right now. It probably involves all the labels calculations.
Note that deactivating the tool and resizing the form to be smaller, there is a point where some axes labels are also hidden to avoid overlapping. The difference with the datatable tool active is that an extra margin is added at the left side to draw the series titles in the tool.
While it isn't enhanced, you could remove this margin:

Code: Select all

if ChartTool1.Active then
    Chart1.MarginLeft:=0;
Or also you could restrict the chart size as in the following example:

Code: Select all

uses DateUtils;

procedure TForm4.FormCreate(Sender: TObject);
var i: Integer;
    dt: TDateTime;
    tmp: String;
begin
  Series1.XValues.DateTime:=true;
  Chart1.Axes.Bottom.DateTimeFormat:='mmm yy';

  for i := 1 to 12 do
  begin
    dt:=EncodeDate(2009, i, 1);
    DateTimeToString(tmp, 'mmm yy', dt);
    Series1.AddXY(dt, random, tmp);
    Series2.AddXY(dt, random);
  end;

  Chart1.MarginUnits:=muPixels;
end;

procedure TForm4.FormResize(Sender: TObject);
var i, tmpWidth: Integer;
begin
  tmpWidth:=Chart1.Canvas.TextWidth(Chart1[0].Name);
  for i:=0 to Chart1[0].Count-1 do
  begin
    tmpWidth:=tmpWidth+Chart1.Canvas.TextWidth(Chart1[0].Labels[i]);
  end;
    tmpWidth:=tmpWidth+Chart1.MarginLeft+Chart1.MarginRight+Chart1[0].Count*15;

  if (tmpWidth > Form4.Width) then
  begin
    Chart1.Align:=alNone;
    Chart1.Width:=tmpWidth;
  end
  else
    Chart1.Align:=alClient;
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

Post Reply