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="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
JavaScript
var columns = [];
$.each([49.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4],function(i,v){
columns.push({
y: v
});
});
$(function () {
$('#container').highcharts({
chart: {
zoomType: 'xy'
},
plotOptions: {
column: {
states: {
hover: {
color: '#000'
}
}
}
},
title: {
text: 'Average Monthly Temperature and Rainfall in Tokyo'
},
subtitle: {
text: 'Source: WorldClimate.com'
},
tooltip: {
shared: true
},
xAxis: false,
yAxis: false,
legend: {
layout: 'vertical',
align: 'left',
x: 120,
verticalAlign: 'top',
y: 100,
floating: true,
backgroundColor: '#FFFFFF'
},
series: [{
name: 'Rainfall',
color: '#E5E5E5',
type: 'column',
data: columns,
tooltip: {
valueSuffix: ' mm'
},
}, {
name: 'Temperature',
color: '#9B59B5',
type: 'spline',
data: columns,
tooltip: {
valueSuffix: '°C'
}
}]
});
});