Highcharts Demo

author(s): Torstein Hønsi

by Danielle Parkinson

HTML

<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<script src="https://code.highcharts.com/modules/export-data.js"></script>

<div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>

JavaScript

Highcharts.chart('container', {
    chart: {
        type: 'areaspline'
    },
    title: {
        text: ' '
    },
    legend: {
        layout: 'horizontal',
        align: 'center',
        verticalAlign: 'bottom',
            itemStyle: {
                color: '#2a3f54',
                fontSize: '14px',
                fontFamily: 'Metrophobic',
                fontWeight: 'normal'
            }
    },
    xAxis: {

       // plotBands: [{ // visualize the weekend
         //   from: 4.5,
          //  to: 6.5,
           // color: 'rgba(68, 170, 213, .2)'
       // }]
    },
    yAxis: {
        type: 'datetime', //y-axis will be in milliseconds
                dateTimeLabelFormats: {
              minTickInterval: 24 * 3600 * 1000,
              millisecond: '%b %e'
            },
        title: {
            text: 'minutes : seconds : milliseconds'
        },
         gridLineColor: '#aec4db',
        labels: {
            style: {
                color: '#2a3f54',
                fontSize: '14px',
                fontFamily: 'Metrophobic'
            }
        }
    },
    tooltip: {
        shared: true,
        valueSuffix: ' units'
    },
    credits: {
        enabled: false
    },
    plotOptions: {
        areaspline: {
            fillOpacity: 0.45
        }
    },
    series: [{
        name: 'Average Total Time',
color: '#73879c',
                pointInterval: 24 * 3600 * 1000, 
        data: [0.56 * 60 * 1000, 0.57 * 60 * 1000, 0.61 * 60 * 1000, 0.63 * 60 * 1000, 0.65 * 60 * 1000, 0.64 * 60 * 1000, 0.62 * 60 * 1000, 0.58 * 60 * 1000, 0.57 * 60 * 1000, 0.55 * 60 * 1000, 0.54 * 60 * 1000, 0.54 * 60 * 1000,],
		    
        marker: {
        		radius: 4,
            fillColor: '#fff',
            lineColor: '#73879c',
            lineWidth: 2,
            symbol: 'circle'
        }
    }, {
        name: 'Average Query Time',
color: '#1abb9c',
                pointInterval: 24 * 3600 * 1000, 
		        data: [0.16 * 60 * 1000, 0.18 * 60 * 1000,...