JSFiddle - React, Tailwind, and code Playground
by Jens Kühn
HTML
<script src="http://code.highcharts.com/stock/highstock.js"></script>
<div id="container" style="height: 500px; min-width: 600px"></div>
JavaScript
$(function() {
var dateStart = 1362114000000;
var seriesData = [{name:'graph1',color:'#009477',data:[]},{name:'graph2',color:'#F9CB15',data:[]}];
// array size
var size = 1001;
for(var i=0; i < size; i++) {
seriesData[0].data[i] = null;
seriesData[1].data[i] = i;
}
// create the chart when all data is loaded
function createChart() {
chart = new Highcharts.StockChart({
chart: {
renderTo: 'container'
},
xAxis: {
type: 'datetime',
dateTimeLabelFormats: {
day: '%d. %m'
}
},
plotOptions: {
series: {
pointInterval: 1000*60*60,
pointStart: dateStart
}
},
series: seriesData
});
}
createChart();
});