Gantt

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
John
Newbie
Newbie
Posts: 7
Joined: Wed May 16, 2007 12:00 am

Gantt

Post by John » Wed May 16, 2007 4:44 pm

I have a provider database with fields that contain: a) provider name, b) date, c) start time and d) end time.

A single provider may have more than one record or (work interval) for a given day. Each work sequence would represent a distinct start and end time.

If I use a Gantt chart with start and end times on the X-axis and user names on the Y-axis, how can I get multiple records (work sequences) for a single provider to display on the same line?

TIA

John :?:

John
Newbie
Newbie
Posts: 7
Joined: Wed May 16, 2007 12:00 am

Single day solution - multiple day not resolved

Post by John » Wed May 16, 2007 7:40 pm

If I:
a) create an new database field, ProviderNumber, and make it Integer,
b) create a Chart Series
c) configure the Chart Series-Datasource-Y-axis as the "ProviderNumber"
d) filter the database table for a single day, I get the results that I need,
- single user per horizontal line
- if user has multiple work times in a given day the areas are individually displayed on the single graph line.

The problem is that this works only for a single day. Is there a mechanism to display multiple days with all users for a single day grouped together, but still on individual horizontal lines?

TIA

John Eastman

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 May 17, 2007 8:03 am

Hi John,

Code: Select all

The problem is that this works only for a single day. Is there a mechanism to display multiple days with all users for a single day grouped together, but still on individual horizontal lines? 
Sorry but I don't understand what do you exactly mean here.

It seems to me that, if you use ProviderNumber as Y values, filtering for a single day should display all ProviderNumbers for that day.

Could you please give us some more information of what the exact problem is? An image or a simple example project we can run "as-is" to reproduce the problem here would be very helpful.

You can post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.

Thanks in advance.
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

John
Newbie
Newbie
Posts: 7
Joined: Wed May 16, 2007 12:00 am

Elaboration

Post by John » Fri May 18, 2007 1:02 am

Yes, if I assign a unique integer to each provider and filter the database table for a single day, I will display all users ordered by their unique integer value and if they are working for more than one time interval in the day all intervals will be displayed on a single horizontal line.

I can then filter the database for day two and continue to number the providers for that day by extending integer numbering system. This will group users by day 0 and then day 1. This procedure can be continued ad infinitum.

The question is whether there is another (more elegant) mechanism to group provider work times by both day and provider, i.e. all time intervals for each provider on a single horizontal line and all providers for a single day grouped together?

TIA

John

Pep
Site Admin
Site Admin
Posts: 3295
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Thu May 24, 2007 2:25 pm

Hi John,

I'm afraid there's not other way to do it automatically. But you can always add the data manually, in this case you can do the selects in order to get the required data and then add them to the series manually using Add method.

If you have had to do similar things but using for example Bar series you would be able to use the DBCrossTabSource component (there's an example in the TeeNew project).

Post Reply