JSFiddle - React, Tailwind, and code Playground

by oysteinmoseng

HTML

<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<script src="https://github.highcharts.com/sonification/modules/sonification.js"></script>

<div id="lineChart" class="container"></div>
<div id="columnChart" class="container"></div>

CSS

.container {
    max-width: 800px;
    height: 400px;
    margin: 3em auto;
}

JavaScript

Highcharts.chart('columnChart', {
    title: {
        text: 'Try the "sonify" option in the export menu'
    },
    xAxis: {
        categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
            'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'
        ]
    },
    chart: {
        type: 'column'
    },
    series: [{
        data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4]
    }, {
        data: [129.9, 171.5, 206.4, 429.2, 244.0, 376.0, 635.6, 248.5, 216.4, 294.1, 195.6, 54.4]
    }, {
        data: [9.9, 71.5, 6.4, 29.2, 44.0, 76.0, 35.6, 48.5, 16.4, 94.1, 5.6, 4.4]
    }, {
        data: [229.9, 271.5, 206.4, 229.2, 244.0, 276.0, 235.6, 248.5, 216.4, 294.1, 295.6, 254.4]
    }]
});

$.getJSON('https://www.highcharts.com/samples/data/jsonp.php?filename=usdeur.json&callback=?', function (data) {
    Highcharts.chart('lineChart', {
        chart: {
            zoomType: 'x'
        },
        title: {
            text: 'Try the "sonify" option in the export menu'
        },
        subtitle: {
            text: document.ontouchstart === undefined ?
                'Click and drag in the plot area to zoom in' : 'Pinch the chart to zoom in'
        },
        xAxis: {
            type: 'datetime'
        },
        yAxis: {
            title: {
                text: 'Exchange rate'
            }
        },
        legend: {
            enabled: false
        },
        plotOptions: {
            area: {
                fillColor: {
                    linearGradient: {
                        x1: 0,
                        y1: 0,
                        x2: 0,
                        y2: 1
                    },
                    stops: [
                        [0, Highcharts.getOptions().colors[0]],
                        [1, Highcharts.Color(Highcharts.getOptions().colors[0]).setOpacity(0).get('rgba')]
                    ]
                },
                marker: {
                    radius: 2
                },
       ...