JSFiddle - React, Tailwind, and code Playground
by alr3
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 () {
var colors = Highcharts.getOptions().colors;
$('#container').highcharts({
chart: {
backgroundColor: '#F5F5F5',
type: 'column'
},
title: {
text: null
},
xAxis: {
categories: ['2005', '2006', '2007', '2008', '2009', '2010', '2011', '2012', '2013', '2014', '2015']
},
yAxis: {
min: 0,
max: 10,
title: {
text: null
},
stackLabels: {
enabled: true,
style: {
fontWeight: 'bold',
color: (Highcharts.theme && Highcharts.theme.textColor) || 'gray'
}
}
},
legend: {
//align: 'right',
x: 30,
verticalAlign: 'bottom',
//y: 75,
//floating: true,
backgroundColor: (Highcharts.theme && Highcharts.theme.background2) || 'white',
borderColor: '#CCC',
borderWidth: 1,
shadow: false
},
tooltip: {
formatter: function () {
return '<b>' + this.x + '</b><br/>' +
this.series.name + ': ' + this.y + '<br/>' +
'Total: ' + this.point.stackTotal;
}
},
plotOptions: {
column: {
stacking: 'normal',
dataLabels: {
enabled: true,
color: (Highcharts.theme && Highcharts.theme.dataLabelsColor) || 'white',
style: {
textShadow: '0 0 3px black'
}
}
}
},
series: [{
name: 'Focus On Technology',
data: [10, 10, 08, 07, 06, 05, 05, 04, 03, 02, 01],
color: colors[0]
}, {
name: 'Focus On Inspiring / Leading People',
data: [00, 00,...