Highcharts Demo

author(s): Torstein Hønsi

by Ryan Brackett

HTML

<script src="https://code.highcharts.com/highcharts.js"></script>

<div id="container" style="height: 400px; width: 500px"></div>

JavaScript

Highcharts.chart('container', {
    xAxis: {
        type: 'datetime',
        dateTimeLabelFormats: {
            day: '%e of %b'
        }
    },







    series: [{
    name: '7-day rolling average',
    lineWidth: 7,
    color: "#0277bd",
    data: [17.98,
      17.42,
      19.5,
      19.32,
      18.79,
      19.59,
      20.4,
      20.63,
      21.6,
      23.8,
      24.87,
      26.53,
      27.68,
      26.03,
      25.65,
      24.55,
      22.65,
      23.24,
      24.14,
      22.89,
      27.09,
      27.64,
      26.67,
      26.32,
      25.32,
      23.53,
      24.48,
      20.91,
      19.88,
      19.23,
      17.72,
      16.35,
      16.16,
      13.74,
      12.31,
      11.39,
      8.84,
      7.31,
      6.96,
      7,
      6.29,
      5.46,
      5.27,
      5.96,
      6.22,
      5.89,
      5.66,
      5.63,
      6.28,
      6.24,
      6.13,
      6.26,
      6.21,
      6.52,
      6.05,
      6.97,
      7.18,
      6.78,
      6.56,
      6.57,
      6.35,
      7.01,
      6.12,
      6.32,
      6.95,
      7.15,
      7.39,
      7.38,
      7.13,
      7.17,
      7.61,
      7.05,
      7.08,
      7.6,
      7.6,
      8.49,
      9.61,
      9.75,
      10.02,
      10.87,
      10.66,
      10.84,
      10.65,
      10.58,
      10.89,
      10.56,
      10.4,
      10.77,
      10.62,
      10.25,
      10.19,
      10.22,
      10.77,
      11.58,
      11.09,
      11.87,
      12.73,
      13.17,
      14.35,
      16.36,
      17.81,
      19.81,
      21.85,
      23.49,
      25.98,
      27.62,
      28.65,
      27.97,
      27.72,
      26.59,
      27.08,
      25.72,
      25.06,
      25.13,
      25.2,
      25.26,
      26.09
    ],
    pointStart: Date.UTC(2020, 3, 1),
    pointInterval: 24 * 3600 * 1000 // one day
  }]
});