Highcharts Demo
author(s):
Torstein Hønsi
by HemalathaThanigaivel
HTML
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<script src="https://code.highcharts.com/modules/export-data.js"></script>
<div id="container" style="min-width: 300px; height: 400px; margin: 0 auto"></div>
JavaScript
var chart = Highcharts.chart('container', {
chart: {
type: 'column'
},
xAxis: {
type: 'datetime',
tickPixelInterval: 150,
labels: {
rotation: -45,
style: {
fontSize: '13px',
fontFamily: 'Verdana, sans-serif'
}
}
},
yAxis: {
min: 0,
title: {
text: 'Population (millions)'
}
},
legend: {
enabled: false
},
tooltip: {
pointFormat: '<b>{point.y:.1f}</b>'
},
series: [{
name: 'Population',
data: [
],
dataLabels: {
enabled: true,
rotation: -90,
color: '#FFFFFF',
align: 'right',
format: '{point.y:.1f}', // one decimal
y: 0, // 10 pixels down from the top
style: {
fontSize: '13px',
fontFamily: 'Verdana, sans-serif'
}
}
}]
});
chart.series[0].update({data:[
[1553685181277, 24.2],
[1553685182277, 20.8],
[1553685183277, 14.9]
]})