JSFiddle - React, Tailwind, and code Playground

by msjaiswal

HTML

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

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

JavaScript

$(function () {
    var chart;
    $(document).ready(function() {
        chart = new Highcharts.Chart({
            chart: {
                renderTo: 'container',
                type: 'line',
                marginRight: 130,
                marginBottom: 25,
                zoomType: 'xy'
            },
            title: {
                text: 'Monthly Average Temperature',
                x: -20 //center
            },
            subtitle: {
                text: 'Source: WorldClimate.com',
                x: -20
            },
            tooltip: {
                formatter: function() {
                        return '<b>'+ this.series.name +'</b><br/>'+
                        this.x +': '+ this.y +'°C';
                }
            },
            plotOptions :
            {
                line : {
                    marker :
                    {
                        enabled: true,
                    }
                }
            },
            legend: {
                layout: 'vertical',
                align: 'right',
                verticalAlign: 'top',
                x: -10,
                y: 100,
                borderWidth: 0
            },
            series: [{
                name: 'Red',
                data: [[0,0],[1,1],[2,2]
                       ,null
                       ,[4,4],[5,5],[6,6]
                       
                       ,null
                       ,[2,0],[3,1],[4,2]
                       ,null
                       ,[6,4],[7,5],[8,6]
                       
                       ,null
                       ,[12,0],[13,1],[14,2]
                       ,null
                       ,[16,4],[17,5],[18,6]
                       
                       ,null
                       ,[22,0],[23,1],[24,2]
                       ,null
                       ,[26,4],[27,5],[28,6]
                       
                       ,null
                       ,[32,0],[33,1],[34,2]
                       ,null
     ...