JSFiddle - React, Tailwind, and code Playground

by asiu

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

JavaScript

$(function () {
    $('#container').highcharts({
        title: {
            text: 'In general, do you approve or disapprove of the job that Congress is doing?',
            x: -20 //center
        },
        subtitle: {
            text: 'Source: NBC News/Wall Street Journal poll (August 2014)',
            x: -20
        },
        xAxis: {
            categories: ['May 2011', 'Jun 2011', 'Aug 2011', 'Jan 2012', 'Aug 2012', 'Jan 2013',
                'Jul 2013', 'Jan 2014', 'Aug 2014']
        },
        yAxis: {
            title: {
                text: 'Percentage of respondents'
            },
            plotLines: [{
                value: 0,
                width: 1,
                color: '#808080'
            }]
        },
        tooltip: {
            valueSuffix: ' percent'
        },
        legend: {
            layout: 'vertical',
            align: 'right',
            verticalAlign: 'middle',
            borderWidth: 0
        },
        series: [{
            name: 'Approve',
            data: [22, 18, 13, 13, 12, 14, 12, 13, 14]
       
    
        }]
    });
});