Highcharts Gantt chart

A demo of the current progress of the Gantt project

HTML

<script src="http://github.highcharts.com/highcharts.js"></script>

<script src="http://github.highcharts.com/gantt/modules/gantt.src.js"></script>

<div id="container"></div>

CSS

#container {
    max-width: 800px;
    height: 400px;
    margin: 1em auto;
}

JavaScript

var year = 365 * 1000 * 60 * 60 * 24;

// THE CHART
Highcharts.chart('container', {
    chart: {
        type: 'gantt'
    },
    title: {
        text: 'Gantt Chart'
    },
    xAxis: [{
        type: 'datetime',
        tickInterval: year * 5,
        labels: {
            format: '{value:%Y}',
            style: {
                fontSize: '15px'
            }
        },
        gridLineWidth: 1,
        maxPadding: 0.2
    }],
    yAxis: [{
        categories: ['President', 'Vice President', 'Secretary of State'],
        reversed: true,
        grid: true
    }],
    series: [{
        showInLegend: false,
        dataLabels: {
        	format: '{point.taskName}'
        },
        data: [{
            start: Date.UTC(1780,0,1),
            end: Date.UTC(1788,0,1),
            taskGroup: 0,
            taskName: 'George Washington'
        }, {
            start: Date.UTC(1788,0,1),
            end: Date.UTC(1794,0,1),
            taskName: 'John Adams',
            taskGroup: 0
        }, {
            start: Date.UTC(1770,0,1),
            end: Date.UTC(1780,0,1),
            taskName: 'John Adams',
            taskGroup: 1
        }, {
            start: Date.UTC(1780,0,1),
            end: Date.UTC(1790,0,1),
            taskName: 'Name Name',
            taskGroup: 2
        }]
    }]
});