JSFiddle - React, Tailwind, and code Playground

by Eve Mwangi

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

JavaScript

$(function () {
    $('#container').highcharts({
        title: {
            text: 'Kenya Tea Production',
            x: -20 //center
        },
        subtitle: {
            text: '',
            x: -20
        },
        xAxis: {
            categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
                'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
        },
        yAxis: {
            title: {
                text: 'Temperature (°C)'
            },
            plotLines: [{
                value: 0,
                width: 1,
                color: '#808080'
            }]
        },
        tooltip: {
            valueSuffix: '°C'
        },
        legend: {
            layout: 'vertical',
            align: 'right',
            verticalAlign: 'middle',
            borderWidth: 0
        },
        series: [{
            name: '2014',
            data: [44969640,33774381,33336338,39974557,41186290,31944583,30789645,26755910,33321224,45367517,38613864,45070785]
        }, {
            name: '2013',
            data: [45389817,38503232,33367736,38229911,39599837,30530170,26229331,26338236,32800016,44282728,35462628,41719058
]
        }]
    });
});