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>
<!--<input type="radio" name="view" value="3" />Oct-Dec
<input type="radio" name="view" value="6" />Jun-Dec
<input type="radio" name="view" value="1" />MTD -->
JavaScript
$(function () {
var grayblue = '#1D1D1D';
var grayred = '#4C4C4C';
dataLondon = [ 48.9, 38.8, 39.3, 41.4, 47.0, 48.3, 59.0, 59.6, 52.4, 45.6, 90.4];
dataBerlin = [ 42.4, 33.2, 34.5, 39.7, 52.6, 75.5, 57.4, 60.4, 47.6, 23.6, 29.1]
highcharts(dataLondon, dataBerlin, 0);
function highcharts(dataLondon, dataBerlin, number) {
$('#container').highcharts({
chart: {
type: 'line'
},
title: {
text: 'Monthly Average Rainfall'
},
subtitle: {
text: 'Source: WorldClimate.com'
},
xAxis: {
categories: [
'Jan',
'Feb',
'Mar',
'Apr',
'May',
'Jun',
'Jul',
'Aug',
'Sep',
'Oct',
'Nov',
'Dec'
],
plotBands: { color: 'Red',
from: 10.5,
to: 10.55,
label: {
text: 'I am label'
}
}
},
yAxis: {
min: 0,
title: {
text: 'Rainfall (mm)'
}
},
tooltip: {
headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
'<td style="padding:0"><b>{point.y:.1f} mm</b></td></tr>',
footerFormat: '</table>',
shared: true,
useHTML: true
},
colors: ['#0000FF', '#FF0000'],
plotOptions: {
column: {
pointPadding: 0.2,
borderWidth: 0
}
},
series: [{
name: 'London',
data: dataLondon
}, {
name: 'Berlin',
data:...