JSFiddle - React, Tailwind, and code Playground
by whoamiwho
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({
chart: {
type: 'column'
},
title: {
text: 'Monthly Average Rainfall'
},
subtitle: {
text: 'Source: WorldClimate.com'
},
xAxis: {
tickWidth: 0,
categories: [
'Feb',
'Mar',
'Apr',
'May',
'Jun'],
plotLines: [{
color: '#A2A3A5',
width: 0.5,
value: 3,
zIndex: 3
}, {
color: '#A2A3A5',
width: 0.5,
value: 4,
zIndex: 3
}]
},
yAxis: {
max: 200,
gridLineWidth: 0,
alternateGridColor: '#E6E6E6',
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
},
plotOptions: {
column: {
pointPadding: 0,
borderWidth: 0
},
line: {
marker: {
symbol: 'circle',
lineWidth: 2,
fillColor: 'transparent'
}
}
},
series: [{
type: 'column',
color: 'rgba(164, 165, 167, 0.75)',
name: 'Tokyo',
data: [49.9, 71.5, 106.4, 129.2, 144.0]
}, {
type: 'column',
color: 'rgba(173, 187, 198, 0.75)',
name: 'New York',
data: [83.6, 78.8, 98.5, 140.4,...