Highcharts Demo
author(s): Sebastian Bochan
by Black Label
HTML
<link rel="stylesheet" type="text/css" href="https://code.highcharts.com/css/stocktools/gui.css">
<link rel="stylesheet" type="text/css" href="https://code.highcharts.com/css/annotations/popup.css">
<script src="https://code.highcharts.com/stock/highstock.js"></script>
<script src="https://code.highcharts.com/stock/modules/drag-panes.js"></script>
<script src="https://code.highcharts.com/modules/annotations-advanced.js"></script>
<script src="https://code.highcharts.com/modules/full-screen.js"></script>
<script src="https://code.highcharts.com/modules/stock-tools.js"></script>
<div id="container" class="chart"></div>
JavaScript
var chart = Highcharts.stockChart('container', {
chart: {
events: {
redraw: function() {
this.annotations.forEach(function(annotation) {
if (annotation.options.type === 'measure') {
annotation.update();
}
});
}
}
},
series: [{
data: [1, 2, 3]
}]
});
console.log(chart);