Highcharts Demo

author(s): Torstein Hønsi

HTML

<div id="container" style="height: 200px"></div>
<div id="report"></div>
<script src="https://code.highcharts.com/highcharts.js"></script>

JavaScript

$(function () {
    var $report = $('#report');

    $('#container').highcharts({
    chart: {
    marginTop: 40
  },
        xAxis: {
            plotBands: [{ // mark the weekend
                color: '#FCFFC5',
                from: Date.UTC(2010, 0, 2),
                to: Date.UTC(2010, 0, 4),
                events: {
                    click: function (e) {
                    		console.log(e)
                        $report.html(e.type);
                    },
                    mouseover: function (e) {
                        $report.html(e.type);
                    },
                    mouseout: function (e) {
                        $report.html(e.type);
                    }
                }
            }],
            tickInterval: 24 * 3600 * 1000,
            // one day
            type: 'datetime'
        },

        series: [{
            data: [{y: 10,x: Date.UTC(2018, 7, 1)},
                   {y: 10,x: Date.now()}],
            pointStart: Date.UTC(2018, 7, 1)
        }]
    }).setOptions({chart: {
    inverted: true,
    marginLeft: 135,
    type: 'bullet'
  }});
});