Highcharts test tool

by Torstein Hønsi

HTML

<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>

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

CSS

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

JavaScript

Highcharts.chart('container', {
	chart: {
    	width: 600
    },
    xAxis: {
		type: 'datetime',
        plotBands: [{
        	from: Date.UTC(2019, 1, 1),
            to: Date.UTC(2019, 1, 10),
            label: {
            	text: 'Testing overflow',
                style: {
                	width: '50px',
                    textOverflow: 'ellipsis'
                }
            }
        }]
    },
    series: [{
        data: [1, 4, 3, 5],
        pointStart: Date.UTC(2019, 0, 1),
        pointIntervalUnit: 'month',
        type: 'column'
    }]
});