JSFiddle - React, Tailwind, and code Playground

by sujay

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',

                zoomType: 'xy'

            },

            title: {

                text: 'Average Monthly Weather Data for Tokyo'

            },

            subtitle: {

                text: 'Source: WorldClimate.com'

            },

            xAxis: [{

                categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',

                    'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']

            }],

            yAxis: [{ // Primary yAxis

                labels: {

                    formatter: function() {

                        return this.value +'°C';

                    },

                    style: {

                        color: '#89A54E'

                    }

                },

                title: {

                    text: 'Temperature',

                    style: {

                        color: '#89A54E'

                    }

                },

                opposite: true

    

            }, { // Secondary yAxis

                gridLineWidth: 0,

                title: {

                    text: 'Rainfall',

                    style: {

                        color: '#4572A7'

                    }

                },

                labels: {

                    formatter: function() {

                        return this.value +' mm';

                    },

                    style: {

                        color: '#4572A7'

                    }

                }

    

            }, { // Tertiary yAxis

                gridLineWidth: 0,

                title: {

                    text: 'Sea-Level Pressure',

                    style: {

                        color: '#AA4643'

                    }

                },

                labels: {

                    formatter: function() {

                        return...