JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://code.highcharts.com/highcharts.js"></script>
<script src="http://code.highcharts.com/modules/exporting.js"></script>
<div id="grafico" style="min-width: 400px; height: 400px; margin: 0 auto"></div>
JavaScript
$(function () {
$('#grafico').highcharts({
chart: {
type: 'line',
marginRight: 130,
marginBottom: 25
},
title: {
text: 'Evolução de torcidas do NE',
x: -20 //center
},
subtitle: {
text: 'De 1970 até 2013',
x: -20
},
xAxis: {
categories: ['1970', '1980', '1990', '2000', '2010', '2013']
},
yAxis: {
title: {
text: 'Torcedores (Em milhões)'
},
plotLines: [{
value: 0,
width: 1,
color: '#f3f3f3'
}]
},
tooltip: {
valueSuffix: ''
},
legend: {
layout: 'vertical',
align: 'right',
verticalAlign: 'top',
x: -10,
y: 100,
borderWidth: 0
},
series: [{
name: 'Bahia',
data: [7.0, 6.9, 9.5, 14.5, 18.2, 21.5]
}, {
name: 'Sport',
data: [-0.2, 0.8, 5.7, 11.3, 17.0, 20.0]
}, {
name: 'Vitória',
data: [-0.9, 0.6, 3.5, 8.4, 13.5, 17.0]
}, ]
});
});