JSFiddle - React, Tailwind, and code Playground
by mlmason
HTML
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://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: 'Average Debt of Graduates 2014'
},
subtitle: {
text: 'Source: WorldClimate.com'
},
xAxis: {
categories: [
'Michigan',
'Central Michigan University',
'Eastern Michigan University',
'Ferris State University',
'Grand Valley State University',
'Michigan State University',
'Michigan Technological University',
'Northern Michigan University',
'Oakland University',
'University of Michigan-Ann Arbor',
'University of Michigan-Dearborn',
'University of Michigan-Flint',
'Wayne State University',
'Western Michigan University'
],
crosshair: true
},
yAxis: {
min: 0,
title: {
text: 'Average Debt'
}
},
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:,.0f} </b></td></tr>',
footerFormat: '</table>',
shared: true,
useHTML: true
},
plotOptions: {
column: {
pointPadding: 0.2,
borderWidth: 0
}
},
series: [{
name: 'Debt',
data: [29,450]
}]
});
});