Gantt Chart with custom axis date format.

author(s): Karol Kołodziej

by b_g_v

HTML

<script src="https://code.highcharts.com/gantt/highcharts-gantt.js"></script>

<div id="container"></div>
<button id="update">Update chart width</button>

JavaScript

const chart = Highcharts.ganttChart('container', {
    xAxis: [{
        dateTimeLabelFormats: {
            week: {
                list: []
            }
        }
    }],
    series: [{
        data: [{
            name: 'Start prototype',
            start: Date.UTC(2014, 2, 18),
            end: Date.UTC(2014, 3, 1)
        }, {
            name: 'Test prototype',
            start: Date.UTC(2014, 3, 1),
            end: Date.UTC(2014, 3, 13)
        }]
    }]
});

document.getElementById('update').addEventListener('click', function () {
    chart.update({
        chart: {
            width: 300
        }
    });
});