Test2
by sanjshah
HTML
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
JavaScript
$(function() {
$('#container').highcharts({
chart: {
zoomType: 'xy'
},
tooltip: {
shared: true
},
plotOptions: {
series: {
allowPointSelect: true,
cursor: 'pointer',
dataLabels: {
enabled: false
},
events: {
//click: ChartClick
},
showInLegend: false,
stacking: 'normal'
}
},
xAxis: {
categories: ['25/07/14', '29/08/14', '26/09/14', '31/10/14', '28/11/14', '26/12/14', '30/01/15', '27/02/15', '27/03/15', '24/04/15', '29/05/15', '26/06/15', '31/07/15', '28/08/15', '25/09/15', '30/10/15', '27/11/15', '25/12/15', '29/01/16', '26/02/16', '25/03/16', '29/04/16', '27/05/16', '24/06/16', '29/07/16', '26/08/16', '30/09/16', '28/10/16', '25/11/16', '30/12/16', '27/01/17', '24/02/17', '31/03/17', '28/04/17', '26/05/17', '30/06/17'],
tickPositioner: function() {
var ret = this.tickPositions,
len = ret.length - 1,
last = this.categories.length - 1;
while (ret[len] > last) {
len--;
ret.pop();
}
ret.push(last);
return ret;
}
},
yAxis: [{
min: 0,
opposite: true,
title: {
style: {
font: '10px Trebuchet MS, Verdana, sans-serif'
},
text: 'Overall Activities'
}
}, {
labels: {
formatter: function() {
return this.value;
},
style: {
color: '#89A54E'
},
style: {
font: '9px Trebuchet MS, Verdana, sans-serif'
}
},
title: {
style: {
font: '10px Trebuchet MS, Verdana, sans-serif'
},
text: 'Weekly Activities'
}
}],
series: [{
data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 6, 11, 36, 53, 63, 79, 143, 96, 83, 96, 74, 60, 63, 91, 87, 17, 22, 14, 0, 0, 0],
name: 'Target',
type: 'column',
color: '#6699CC',
yAxis: 1
...