Qlik Community

QlikView Documents

Documents for QlikView related information.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Gantt Chart Extension Object (version 2.0)

Employee
Employee

Gantt Chart Extension Object (version 2.0)

Update as At 7/5/2014

------------------------------------

For those who do not wish to use an extension object, there is a great example of creating a detailed Gantt using a pivot table at the following link. http://community.qlik.com/thread/109784

Attached is a Gantt Chart Extension Object developed specifically for QlikView. In version 2.0 I have tweaked the design a little to make it easier to configure - dates are now configured as expressions, so you can apply the necessary formatting in the object rather than your load script. It also better handles longer time frames via the compress option, as it compresses months into a single cell in the table. (Set the defaults to always be month and compressed if you have very long time frames, otherwise it creates a cell for each day and the HTML table may get excessively large).

Note that this object will work with QlikView version 11. The chart is configurable via many default settings and as it is written in javascript it is fully customisable. Below is a screen shot of the extension object.

Screen Shot.jpg

You can now compress the time periods displayed by making selections as highlighted below and clicking on the Redraw Chart button.

Summarised.jpg

I have been getting some display issues with IE9, but testing with IE8 turned up no problems. It also seems to be trouble free with Chrome or Firefox. The IE errors are due to a bug with how IE9 handles the "width:100%" HTML attribute. It does not seem to display in the iPad, possibly due to the complex javascript involved in rendering the object.

FEATURES

  • Expand and contract nodes in the task tree hierarchy by clicking on the + or – sign.
  • Switch between Weekly time series and Monthly time series (default option is configurable)
  • Optionally summarize the time periods to display more data in the available screen space
  • Assign external URL links that will open when clicking on the <link> text in the task description field.
  • Task details display in pop-up 'bubble' when hovering over gantt bar.
  • Parent level bars can be set to display always or only when the relevant 'branch' is collapsed
  • Optionally assign a specific color to individual task bars.

Note that the chart is currently limited to displaying a single project at a time. Sample data and a sample QlikView application are provided in the attached zip file. The extension object is also packed in the zip as a QAR file. There is also a comprehensive set of instructions and notes in the file READ ME FIRST. Please read these instructions before posting any questions.

I will be adding more functionality and refining it over time. I welcome your feedback and suggestions as to what you would like to see in such an extension object. Please post your comments here and I will follow them up as soon as practical.

Attachments
Comments
mwoolf
Honored Contributor II

Ignore my comment - the DD/MM/YYYY format confused me.

Employee
Employee

Thanks for the input. I went back to my copy and I cant see any tasks starting dates on 5/5 though. Can you tell me which task it is?

mwoolf
Honored Contributor II

Please ignore my comment - the DD/MM/YYYY format confused me

bomarino
New Contributor

Hi Lee

I tried to use your extension but after entering all the fields wich i still can see anything.Can you help me?

Marino

Employee
Employee

Hi

Are you able to post an application with a sample of your data (scrambled is OK)? I can look into what might be happening.

My guess though is that you need to edit the vDateStrFmt parameter for date formats in the file lmsGanttChart.js. It is currently set to expect a format of dd/mm/yyyy. Change to mm/dd/yyyy for US formatted dates. Also, ensure the dates are formatted this way when passed to the extension object. You can use a calculated dimension like date([date_field], 'MM/DD/YYY') for your dates to force the format. The dates effectively get passed to the extension object as strings, so if the format is not correct then the javascript logic cannot convert them to proper dates and do all of the calculations.

Regards

Lee

bomarino
New Contributor

Thank you for the very fast response
I used your example and I set the date in the format DD / MM / YYYY
I can see from the chart but duration is always one day
Can you help me?

regards Marino

ps:sorry i'm new in this formum

and i don't know how to upload document

Employee
Employee

Odd, I cant find a way to add a document either. There is usually a link for Advanced Editor. Try this; Create a new discussion from the very top menu, but choose Private Discussion. Then find my name in the list (Lee Matthews). You should be able to add the file then, and I will get notification as I am linked to the discussion.

If the chart is displaying but duration is just one day, then it may be that the start and end dates being fed to the extension are the same. Check your dates (and other fields) by creating a straight table with the same dimensions and measure as the extension. Otherwise I would be happy to check over your application.

Thanks! I will update the doco based on your feedback to make these configurations clearer.

bomarino
New Contributor

as soon as I have time I send the document
Today I leave for vacation as soon as I re-contact you
thanks again

Marino

Employee
Employee

I have uploaded an updated copy of the extension object and documentation. The main changes to the extension object were to correct the field descriptions in the properties sheet, (these were not consistent with the order or fields required). The documentation is also updated, including a troubleshooting section. You can debug the extension by setting variable iDebug=1 in the lmsGanttChart.js file. This will use an alert to display the XML built by the extension object from the QlikView data. It will also output the HTML created to a pop-up window (ensure pop-ups not blocked).

gjamila_esq
Contributor

Hi,

I have QV11 desktop sr2. I'm not able to run the document. Leaving everything untouched (qv file, excel) if i mark a project the result is the same:

Cattura.JPG

Can you help me?

Thank you!!

Version history
Revision #:
1 of 1
Last update:
‎09-24-2012 07:34 PM
Updated by:
Employee