Highcharts Demo
author(s):
Torstein Hønsi
by arjunasuresh3
HTML
<script src="https://code.highcharts.com/stock/4.2.3/highstock.js"></script>
<div id="container" style="height: 400px"></div>
JavaScript
$(function () {
$('#container').highcharts({
xAxis: {
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
},
plotOptions: {
series: {
point: {
events: {
click: function() {
console.log(this.series.name);
}
}
}
}
},
tooltip: {
shared: true
},
series: [{
zIndex: 1,
marker: {
radius: 8,
shape: "circle"
},
data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4]
}, {
zIndex: 2,
marker: {
radius: 4,
shape: "circle"
},
data: [216.4, 194.1, 106.4, 54.4, 29.9, 71.5, 106.4, 148.5, 129.2, 176.0, 135.6, 148.5]
}]
});
});