Gantt Chart. Width of bars.

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
TonyHunt
Newbie
Newbie
Posts: 15
Joined: Mon Jan 15, 2007 12:00 am

Gantt Chart. Width of bars.

Post by TonyHunt » Sun Jul 19, 2009 4:35 pm

Hi,

How do I find the width of a gantt bar at run time.

Then, how do I resize by code?

If there are any examples which show this, I apologise in advance...
It is VERY late on a Sunday afternoon and my wife has just handed me a glass of wine... :D

Best Wishes,

Tony

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

Re: Gantt Chart. Width of bars.

Post by Yeray » Mon Jul 20, 2009 8:44 am

Hi Tony,

I think you are looking for that:

Code: Select all

Series1.Pointer.VertSize := 20;
TonyHunt wrote:It is VERY late on a Sunday afternoon and my wife has just handed me a glass of wine... :D
I totally agree with you wife. There are thousands of things to do on Sundays better than working. Maybe you wife was insinuating you one... ;)
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

TonyHunt
Newbie
Newbie
Posts: 15
Joined: Mon Jan 15, 2007 12:00 am

Re: Gantt Chart. Width of bars.

Post by TonyHunt » Mon Jul 20, 2009 11:51 am

Thanks for the quick response.

>>Series1.Pointer.VertSize := 20;<<

I'm sorry, I asked the wrong question.. :oops:

I guess I REALLY meant the Length of the bar itself, not the pointer..

I get confused by VertSize referencing the Width....... Sometimes English is SO convoluted.

Best Wishes

Tony

AND of course you were quite right. Life was MUCH better after the glass of wine....

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

Re: Gantt Chart. Width of bars.

Post by Yeray » Mon Jul 20, 2009 12:09 pm

Hi Tony,

Excuse me, I think you answered perfectly but I understood it in a bad way because the length (or the width) of each gantt comes from the difference between its Start and End value. If what you want is to change one of those values, you could do it as follows, for example:

Code: Select all

Series1.EndValues.Value[3] := Series1.EndValues.Value[3] + DateTimeStep[dtOneWeek];
If that's not still what you meant, could you please attach here a picture showing us the expected result?
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

TonyHunt
Newbie
Newbie
Posts: 15
Joined: Mon Jan 15, 2007 12:00 am

Re: Gantt Chart. Width of bars.

Post by TonyHunt » Fri Jul 24, 2009 9:30 am

Sorry for the delay answering. The advantage with working Sunday is I don't allways work midweek. :)
Thank you for the answer, it was exactly what I needed.

Tony

Post Reply