Highcharts Demo

author(s): Torstein Hønsi

by prince4prodigy

HTML

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

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

JavaScript

Highcharts.chart('container', 
  {
                chart: {
                type: 'column',
                animation: {
                    duration: 1000
                },
                },
                legend: {
                    enabled: false
                },
             title: {
                text: 'Highchart'
                    },
            xAxis: {
                type: 'datetime',
                dateTimeLabelFormats: { // don't display the dummy year
                    month: '%e. %b',
                    year: '%b'
                },
                title: {
                    text: 'Date'
                },

            },
            yAxis: {
                allowDecimals: false,
                title: {
                    text: 'Units'
                }
            },
            
            credits: false,
            tooltip: {
                headerFormat: '<span style="font-size:11px">{series.name}</span><br>',
                pointFormat: '<span style="color:{point.color}">{point.name}</span>: <b>{point.y:.2f}</b><br/>'
            },
    series: [
                
                    {
                    name: 'C1',
                        data: [
                                [Date.parse("04/26/2017" + " UTC"), 40],
                                [Date.parse("04/25/2017" + " UTC"), 143],
                                [Date.parse("04/24/2017" + " UTC"), 40],
                                [Date.parse("04/23/2017" + " UTC"), 30],
                                [Date.parse("04/22/2017" + " UTC"), 20],
                                [Date.parse("04/21/2017" + " UTC"), 20],
                        ]
                    },
                
                
                    {
                    name: 'C2',
                        data: [
                                [Date.parse("04/26/2017" + " UTC"), 10],
                                [Date.parse("04/25/2017" + " UTC"), 13],
                               ...