Gl.ib.ly

(glibly); Just another techie blog.

Gantt charts in Microsoft Excel

Posted by Tariq • Tuesday, December 16. 2008 • Category: Computers, Rants
As mentioned in other articles I sometimes like to output data in CSV format and redirect to a file and then open that file with my favourite spread sheet application to create pretty charts instead of using awk to create command line graphs or gnuplot. However I recently found out that Microsoft Excel doesn't do Gantt charts by default, so what follows is an explanation of what I was trying to do and how I simulated a Gantt chart in Excel.

We are hosting a number of databases which are in use for only periods of time during the day. So for instance our US database is only used for working hours across the US. I wanted to represent the times in which a database was in active use using a Gantt chart. To do this I created a table like the one below.

Normalized by7
DBUsage start (GMT offset)DurationDay start*Day end*Day wrap startDay wrap endDay wrap durDay wrap diff
US-7100100090
..........................


This looks way too complicated! We should have only Usage start (GMT offset) and day duration for a Gantt chart? Well, yes, but no. I want to show the number of overlapping usage in a 24 hour period and because there is no Gantt support I have to hack it a bit. So let me explain each of the columns.

Normalized by - This is the lowest value in the Usage start (GMT offset) column less than zero. This value is multiplied by -1 to make it positive.
DB - The database in use.
Usage start (GMT offset) - The earliest time in which this DB is in use, given by GMT offset.
Duration - The amount of time the database is used for.
Day start - Usage start + Normalized by.
Day end - Day start + Duration.
Day wrap start - Always zero.
Day wrap end - If Day end mod 24 is less then Day start then this value is (Day end mod 24); else 0. All my durations are less than 24 hours.
Day wrap dur - Duration minus Day wrap end.
Day wrap diff - Day start minus Day wrap end.

This all seems superbly weird until I mention that we will be using a stacked bar chart to simulate a Gantt chart. In our stacked bar chart we have three values which can appear:
  1. Day wrap end.
  2. Day wrap diff.
  3. Day wrap duration

To make our Gantt chart the second data series will be made invisible. We also need to set the colour of the third data series to the same as the first.

Here is one I made earlier:


Edit: This is a draft, I have no idea why it exists. Publishing this is a karma -3 but hey it may be useful to someone.
Defined tags for this entry: , , , , , , ,
Vote for articles fresher than 90 days!
Bookmark Gantt charts in Microsoft Excel  at del.icio.us Digg Gantt charts in Microsoft Excel Bloglines Gantt charts in Microsoft Excel Technorati Gantt charts in Microsoft Excel Fark this: Gantt charts in Microsoft Excel Bookmark Gantt charts in Microsoft Excel  at YahooMyWeb Bookmark Gantt charts in Microsoft Excel  at Furl.net Bookmark Gantt charts in Microsoft Excel  at blogmarks Stumble It!

0 Trackbacks

  1. No Trackbacks

0 Comments

Display comments as (Linear | Threaded)
  1. No comments

Add Comment


Standard emoticons like :-) and ;-) are converted to images.

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.
CAPTCHA

You can use [geshi lang=lang_name [,ln={y|n}]][/geshi] tags to embed source code snippets.