downrunner

Gantt

Interactive Gantt charts directly in your Markdown with options to edit the chart data and show or hide the Markdown.

You can mouseover or tap and hold items on the chart to get details.

Open the optional editor below and edit the plan data. Then click on the chart.

Dates will be computed from dependencies and vice-a-versa.

Dates can be specified as date strings, e.g. Sat Oct 03 2020 07:04:46 GMT-0700 (Pacific Daylight Time) or as data, e.g. {year:2020,month:10,day:3,hour:4,minute:46}.

If it is a number, then duration is in days. You can also use data of the form: {years:1,months:2,days:0,hours:1,minutes:10,seconds:50}, which is one year, two months, one hour, ten minutes and zero seconds in duration.

Additional options include setting a start date if there is no start in the plan and setting a default resource.

{
    plan: [
        {id:Research, name:'Find sources', resource:'My Assistant',
            start:{year:2015,month:1,day:1},  end:{year:2015,month:1,day:15}, pctComplete:100},
        {id:Write, name:'Write paper', duration:{months:1,days:15}, dependencies:'Research,Outline'},
        {id:Cite, name:'Create bibliography', resource:'My Assistant', duration:2, dependencies:Write},
        {id:Complete, name:'Hand in paper', end:{year:2015,month:2,day:28}, dependencies:'Cite,Write'},
        {id:Outline, name:'Outline paper',duration:3, pctComplete:50, dependencies:Research}
    ],
    options: {
        title: MyPlan,
        gantt: {
            start: {year:2021,month:1,day:1},
            defaultResource: Me
        }
    }
}

Below is the source:

If you can remember the order of the data in the plan, [id, name, resource, start, end, duration, pctComplete, dependencies] and always provide values for all of them you can use a shorthand method to specify them. You can use null for data you do not want to provide, e.g. end if it is being computed from dependencies and duration. This is useful for large plans.

```json
{
	   plan: 
	[
		[Research,'Find sources','My Assistant',{year:2015,month:1,day:1},{year:2015,month:1,day:15},null,100,null],
		[Write,'Write paper',null,null,null,{months:1,days:15},null]
	],
	options: {
		title: MyPlan,
		gantt: {
			start: {year:2021,month:1,day:1},
			defaultResource: Me
		}
	}
}
```