Highcharts test tool
by Ronny Roos
HTML
<script src="https://code.highcharts.com/stock/highstock.js"></script>
<script src="https://code.highcharts.com/stock/modules/exporting.js"></script>
<div id="container"></div>
CSS
#container {
min-width: 310px;
max-width: 800px;
height: 400px;
margin: 1em auto;
}
JavaScript
var data = [
[1446147110000, 10.00, 20.00],
[1446147135000, 22.38, 22.19],
[1446150796000, 22.38, 22.19],
[1446150855000, 22.38, 22.19],
[1446150916000, 22.38, 22.19],
[1446150975000, 22.38, 22.19],
[1446151036000, 22.38, 22.19],
[1446151336000, 22.31, 22.25],
[1446151395000, 22.38, 22.19],
[1446151456000, 22.38, 22.25]
];
$('#container').highcharts('StockChart', {
xAxis: {
minRange: 3600 * 1000 // one hour
},
yAxis: {
floor: 0
},
series: [{
data: data
}],
chart: {
type: 'line',
zoomType: 'x'
},
navigator: {
adaptToUpdatedData: false,
series: {
data: data
}
},
rangeSelector: {
buttons: [{
type: 'hour',
count: 1,
text: '1h'
}, {
type: 'day',
count: 1,
text: '1d'
}, {
type: 'month',
count: 1,
text: '1m'
}, {
type: 'year',
count: 1,
text: '1y'
}, {
type: 'all',
text: 'All'
}],
inputEnabled: false, // it supports only days
selected: 4 // all
}
});