Highcharts Demo
author(s): Torstein Hønsi
by gauravsingh
HTML
<script src="http://code.highcharts.com/highcharts.js"></script>
<div id="container" style="height: 400px"></div>
JavaScript
$(function () {
$('#container').highcharts({
chart: {
type: 'column',
plotBackgroundColor: "#FFFFFF",
height: 400,
style: {
fontFamily: '"Calibri","sans-serif"',
}
},
exporting: {
'enabled': false
},
credits: {
text: '',
href: '',
style: {
cursor: 'pointer',
color: '#909090',
fontSize: '9px',
},
position: {
align: 'right',
}
},
title: {
text: 'Liberia',
fontSize: '16px',
fontWeight: 'bold',
},
xAxis: {
type: 'linear',
categories: [
'11-Jan',
'18-Jan',
'25-Jan',
'01-Feb',
'08-Feb',
'15-Feb',
'22-Feb',
'01-Mar',
'08-Mar',
'15-Mar',
'22-Mar',
'29-Mar',
'05-Apr',
'12-Apr',
],
labels: {
style: {
fontSize: '12px'
},
step: 2,
rotation: -45,
}
},
yAxis: {
min: 0,
tickInterval: 50,
title: {
text: ''
}
},
legend: {
enabled: false
},
plotOptions: {
series: {
dataLabels: {
enabled: true,
formatter: function () {
if(this.y>0) return this.y;
}
},
}
},
series: [{
name: 'Confirmed cases',
data: [
8,
8,
4,
...