Highcharts Demo

author(s): Torstein Hønsi

by alfredopacino

HTML

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

<div id="container"></div>

JavaScript

let chart = Highcharts.chart('container', {
    chart: {
        type: 'scatter',
        zoomType: 'xy'
    },
    title: {
        text: 'Requests per Minute'
    },
    xAxis: {
        type: 'datetime',
        dateTimeLabelFormats: {
            minute: '%H:%M',
            hour: '%H:%M',
        }
    },
    tooltip: {
        formatter: function() {
            return  '<b>' + this.y + ' requests</b><br>' + Highcharts.dateFormat('%l:%M %p - %e %b', new Date(this.x));
        }
    },
    yAxis: {
        title: {
            text: 'Requests per Minute'
        }
    },
    legend: false,
    credits: {
        enabled: false
    },
    plotOptions: {
        scatter: {
            marker: {
                radius: 1,
                states: {
                    hover: {
                        enabled: true,
                        lineColor: 'rgb(100,100,100)'
                    }
                }
            }
        }
    },
    responsive: {
        rules: [{
            condition: {
                maxWidth: 500
            },
            chartOptions: {
                legend: {
                    layout: 'horizontal',
                    align: 'center',
                    verticalAlign: 'bottom'
                }
            }
        }]
    },
    series:...