Transparency in GANTT bars

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

Transparency in GANTT bars

Post by Brace » Wed Mar 19, 2008 4:05 pm

Hi.

I would like to know how it is possible to use some degree of transparency in Gantt bars.

I have a situation similar to the one in the demo application for teechart 7 in:

Welcome!/Chart styles/Gantt/Mouse dragging

with the 2 bars "David" and "David 2" superimposed.

Is there a way to see them in transparency or can you suggest some trick so that the user can see the 2 bars and drag them? Basically I use every "double bar" to identify "expected time vs effective time" so I would like the user to be able to drag all the four points (start/end of expected time bar, start/end of effective time bar). Of course if the 2 bars are superimposed, like
Bar1: 1st january -10th january
Bar2: 2nd January-12th january
if Bar2 is above Bar1 I won't be able to access the end of bar1 (since 10th january < 12th january)
Even worse if a bar is fully contained in the other and the longer is over the shorter. In this case I will not see the shorter bar at all.

Now If transparency is possible I would like to drag also the bar that is not visible in the above example.

If this is not possible do you have another solution?

I am using TeeChart 7.07 with Delphi 7.

Thanks.

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

Post by Narcís » Wed Mar 19, 2008 4:16 pm

Hi Brace,

Yes, you can set gantt bars transparency like this:

Code: Select all

  Series1.Transparency := 50;
Now If transparency is possible I would like to drag also the bar that is not visible in the above example.
I'm afraid this is not possible, you'll have to drag/resize the above bar before.

The only way I can think of to achieve that is changing bars indexes in the series, for example:

Code: Select all

  Series1.StartValues.Exchange(index1,index2);
  Series1.EndValues.Exchange(index1,index2);
  Series1.YValues.Exchange(index1,index2);
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

Brace
Newbie
Newbie
Posts: 11
Joined: Tue Jun 12, 2007 12:00 am

Post by Brace » Thu Mar 20, 2008 2:14 pm

Thanks for the answer. I'll try as you suggest.

Just another question: selection of multiple bars it is not possible?

Like ctrl-clicking 3 bars and then dragging them all at the same time?

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

Post by Narcís » Thu Mar 20, 2008 3:19 pm

Hi Brace,

I'm afraid not. The only way I can think of to achieve that is selecting several bars using the OnMouseDown event, for example, and then use the OnMouseMove event to drag them. Something like the example I posted here. It is a TeeChart for .NET example but the same could be used in the VCL version.
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