JSFiddle - React, Tailwind, and code Playground

by Marie-Louise Timcke

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: 650px; height: 450px; margin: 0 auto"></div>

CSS

#container {
    background: url(http://journocode.com/wordpress/wp-content/uploads/2016/04/log.png);
}

JavaScript

function OpenInNewTab(url) {
  var tab = window.open("http://www.lanuv.nrw.de/umwelt/luft/immissionen/berichte-und-trends/einzelwerte-kontinuierlicher-messungen/", '_blank');
  tab.focus();
}
$(function () {
    $('#container').highcharts({
        chart: {
            cursor: 'pointer',
            type: 'scatter',
            zoomType: 'xy',
            backgroundColor: 'transparent'
        },
        title: {
            text: 
            'Stundenmittelwert von Stickstoffdioxid<br>1980 bis 2015'
        },
        subtitle: {
            text: '<p>Quelle: <u onclick="OpenInNewTab();">LANUV</u></p>',
            useHTML: true
        },
        xAxis: {
            type: 'datetime',
            tickInterval: 3600 * 1000 * 24,
            title: {
                enabled: true,
                text: 'Datum der Messung'
            },
            startOnTick: true,
            endOnTick: true,
            showLastLabel: true
        },
        yAxis: {
            title: {
                text: 'Mittelwert [µg/m≥]'
            }
        },
        legend: {
            layout: 'vertical',
            align: 'left',
            verticalAlign: 'top',
            x: 100,
            y: 70,
            floating: true,
            backgroundColor: '#FFFFFF',
            borderWidth: 1
        },
        tooltip: {
            formatter: function () {
                if (this.series.name == "Bielefeld") {
                    return "<b>" 
                    + this.series.name
                    + "</b><br>" 
                    + this.y
                    + "Mittelwert [µg/m≥]";
                }
             if(this.series.name == "Bonn") { 
                return "<b>" 
                + this.series.name
                + "</b><br>" 
                + this.y
                + "Mittelwert [µg/m≥]";
            }
            }
        },
        series: [{
            name: 'Bielefeld',
            color: '#02223f',
            pointInterval:  3600 * 1000 * 24,
  ...