Flags
by Roydon DSouza
HTML
<script src="http://code.highcharts.com/stock/highstock.js"></script>
<div id="container" style="height: 400px"></div>
JavaScript
$(function () {
$('#container').highcharts({
chart: {
type: 'line'
},
xAxis: {
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
},
plotOptions: {
series: {
allowPointSelect: true
}
},
series: [{
id: 'dataseries',
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]
}, {
type: 'flags',
data: [{
x: 2,
text: 'Start of campaign'
},{
x: 2,
text: 'Start of campaign'
},{
x: 2,
text: 'Start of campaign'
}, {
x: 2,
note: 'End of Campaing'
}, {
x: 2,
note: 'End of Campaing'
}, {
x: 2,
note: 'End of Campaing'
}],
onSeries: 'dataseries',
width: 16,
height:16,
lineWidth:3,
lineColor:'black',
shape: 'circlepin'
}]
});
});