Vizlib Home
Welcome
Login

Vizlib Gantt - Data Model Requirements

The Vizlib Gantt is a 100% data-driven solution leveraging Qlik's powerful associative data-engine. To create a Vizlib Gantt on top of your own data model, you need to ensure some prerequisites are met and certain dimension fields are available in your Qlik Sense app.



Build your own Vizlib Gantt ready load script:

Events:
Load
   date(floor((today() - (ParentGroupNum*20 * (rand()) )))) as StartDate,
   date(floor((today() + (ParentGroupNum*20 * (rand()) )))) as EndDate,
   * ;
Load
 'Event ' & ID as Event,
  Pick(Ceil(3*Rand1),'1','2','3') as ParentGroupNum,
 Pick(Ceil(3*Rand1),'A','B','C') as ParentGroup,
 Pick(Ceil(6*Rand1),'a','b','c','d','e','f') as Group,
 Pick(Ceil(3*Rand()),'X','Y','Z') as SubGroup,
 rand() *1000 as Cost,
 Pick(Ceil(3*Rand()),'Jo','Jack','Jill') as Resource,
* ;
Load 
 Rand()  as Rand1,
 Rand()*5  as RandWhole,
 IterNo() as LineID,
 RecNo() as ID
Autogenerate 100 While Rand()<=0.5 or IterNo()=1;




Data Model Definition:

The key fields which can be read by the Vizlib Gantt are the following:


Field NameSupported TypesDescriptionNeeded
Field Name
in example file
[Events]
$text, $ascii, $numeric, $integerThis is the unique identifier or name of the event, project, or task. This field represents the main driver of the Gantt.Required[Event]
[Start Date]$timestamp, $date
This field defines the start date of the event, task or project. Required[Start Date]
[End Date]$timestamp,
$date
This field defines the end date of an event, task or project. If omitted, events will not expand over a timeline and will appear as static single day events
Optional[End Date]
[Group]$text, $ascii, $numeric, $integer
This field organizes events, projects or tasks into a hierarchical group. Groups can be expanded or collapsed, just like in a pivot table, and individual events are aggregated to a group view.Optional[Phase]
[Sub Group]$text, $ascii, $numeric, $integer
This field allows you to create a multi-level hierarchy and works in exactly the same way as the [Group] field. Sub Groups are organized at one level below the [Group] field.Optional[Group]
[Parent Group]$text, $ascii, $numeric, $integer
This field allows you to create a multi-level hierarchy and works in exactly the same way as the [Group] field. Parent Groups are organized at one level above the [Group] field.
Optional[Plan Type]
[Event Type]"event" or "milestone"The Vizlib Gantt supports different representation types such as events or milestones. This can be driven dynamically by defining the type in the [Event Type] field. At the moment there are only two types supported, and more will be introduced in due course.
OptionalQlik expression



Further to the above fields, you will be able to define many more settings or properties dynamically via expressions, such as the background colors for each event. Those expressions can be variables, calculations or even simple dimension values.


Example Vizlib Gantt:


Example Dataset:







M
Martin is the author of this solution article.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.