Highcharts Stock Demo

author(s): Torstein Hønsi

by Yonathan Benitah

HTML

<div id="container" style="height: 400px; min-width: 600px"></div>
<div class="info">Weekends should appear as gaps in the graph.</div>

<script src="https://code.highcharts.com/stock/highstock.js"></script>
<script src="https://code.highcharts.com/stock/modules/exporting.js"></script>
<script type="text/javascript" src="https://www.highcharts.com/samples/data/usdeur.js"></script>

CSS

.info {
    font: 0.7em sans-serif;
    padding: 0.5em;
    margin: 0.5em;
    background: #FCFFC5;
    border-radius: 0.5em;
    border: 1px solid gray;
}
.info:before {
    content: 'i';
    margin: 0.5em;
    font: 1.5em serif bold;
    font-style: italic;
    color: green;
}

JavaScript

var TEST = [
    [1313964000000,23.17],
    [1314050400000,23.78],
    [1314136800000,24.10],
    [1314223200000,23.86],
    [1314309600000,24.54],
    [1314568800000,25.51],
    [1314655200000,25.19],
    [1314741600000,25.24],
    [1314828000000,24.77],
    [1314914400000,24.15],
    [1315260000000,23.74],
    [1315346400000,25.30],
    [1315432800000,24.99],
    [1315519200000,24.64],
    [1315778400000,25.20],
    [1315864800000,25.18],
    [1315951200000,25.75],
    [1316037600000,26.12],
    [1316124000000,25.52],
    [1316383200000,25.27],
    [1316469600000,24.64],
    [1316556000000,24.89],
    [1316642400000,24.31],
    [1316728800000,24.88],
    [1316988000000,25.13],
    [1317074400000,25.56],
    [1317160800000,25.11],
    [1317247200000,24.99],
    [1317333600000,24.17],
    [1317592800000,23.26],
    [1317679200000,24.04],
    [1317765600000,24.68],
    [1317852000000,25.33],
    [1317938400000,25.28],
    [1318197600000,25.76],
    [1318284000000,25.84],
    [1318370400000,25.88],
    [1318456800000,25.80],
    [1318543200000,26.81],
    [1318802400000,26.24],
    [1318888800000,26.76],
    [1318975200000,26.02],
    [1319061600000,26.08],
    [1319148000000,27.30],
    [1319407200000,28.20],
    [1319493600000,27.85],
    [1319580000000,27.81],
    [1319666400000,28.34],
    [1319752800000,29.02],
    [1320015600000,29.41],
    [1320102000000,28.59],
    [1320188400000,29.35],
    [1320274800000,30.16],
    [1320361200000,29.79],
    [1320620400000,29.92],
    [1320706800000,30.42],
    [1320793200000,28.08],
    [1320879600000,28.03],
    [1320966000000,28.43],
    [1321225200000,28.24],
    [1321311600000,28.47],
    [1321398000000,28.54],
    [1321484400000,27.69],
    [1321570800000,27.18],
    [1321830000000,26.63],
    [1321916400000,26.33],
    [1322002800000,25.94],
    [1322175600000,25.83],
    [1322434800000,26.62],
    [1322521200000,26.07],
    [1322607600000,27.42],
    [1322694000000,27.14],
    [1322780400000,27.11],
   ...