JSFiddle - React, Tailwind, and code Playground

by Ramkumar Pillai

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: 'spline',
                zoomType: 'y',
            },
            title: {
                text: 'Column chart with negative values'
            },
            xAxis: {
                categories: ['Apples', 'Oranges', 'Pears', 'Grapes', 'Bananas']
            },
            yAxis: {
              
                title: {
                  enabled: true,
                  text: ' Downlink(%) Uplink/Span(%)' 
                },
                labels: {
                    formatter: function(){
                        return (Math.abs(this.value)) + 'M';
                    }
                }
            },
            tooltip: {
                formatter: function() {
                    return ''+
                        this.series.name +': '+ Math.abs(this.y) +'M';
                }
            },
            credits: {
                enabled: false
            },
            plotOptions: {
                  series: {
                       events: {
                           legendItemClick: function(event) {
                               name = this.name.replace(' ', '');
                               this.visible ? this.chart.get(name).hide() : this.chart.get(name).show();
                           }
                       }
                  }
            },
            series: [{
                id: 'error1',
                name: 'Errors One',
                color:'red',
                data: [5, 3, 4, 7, 2],
            }, {
                id: 'ErrorsOne',
                color: 'red',
                data: [-222, -234, -123, -189, -289],
                showInLegend: false
            }, {
                id:'error2',
                name: 'Errors Two',
                color:'blue',
                data: [3, 4, 4, 2, 5],
            }, {
               ...