JSFiddle - React, Tailwind, and code Playground
by jbenedict
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; max-width: 800px; height: 400px; margin: 0 auto"></div>
CSS
against
5, 10, 1
by
4, 5, 7
JavaScript
$(function () {
$('#container').highcharts({
chart: {
type: 'bar'
},
title: {
text: 'Number of Complaints filed by each ticket'
},
subtitle: {
text: 'Source: IUSA Election Comission'
},
xAxis: {
categories: ['INTouch', 'Amplify', 'Unify'],
title: {
text: null
}
},
yAxis: {
min: 0,
title: {
text: 'Complaints ',
align: 'high'
},
labels: {
overflow: 'justify'
}
},
tooltip: {
valueSuffix: ' Complaints'
},
plotOptions: {
bar: {
dataLabels: {
enabled: true
}
}
},
legend: {
layout: 'vertical',
align: 'right',
verticalAlign: 'top',
x: -40,
y: 100,
floating: true,
borderWidth: 1,
backgroundColor: ((Highcharts.theme && Highcharts.theme.legendBackgroundColor) || '#FFFFFF'),
shadow: true
},
credits: {
enabled: false
},
series: [{
name: 'Complaints filed by each ticket',
data: [4, 5, 7]
}, {
name: 'Complaints filed against each ticket',
data: [5, 10, 1]
}]
});
});