JavaScript
$(function () {
$('#container').highcharts({
chart: {
type: 'bar'
},
title: {
text: 'Police responses to marijuana complaints in 2015'
},
subtitle: {
text: 'Source IUPD'
},
xAxis: {
categories: ['Ashton', 'Briscoe', 'Collins', 'Eigenmann', 'Forest', 'Foster', 'McNutt', 'Read', 'Rose', 'Teter', 'Union Street', 'Wilkie', 'Wright'],
title: {
text: null
}
},
yAxis: {
min: 0,
title: {
text: ' ',
align: 'high'
},
labels: {
overflow: 'justify'
}
},
tooltip: {
valueSuffix: ' '
},
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: 'Total Incidents',
data: [5, 10, 7, 11, 17, 18, 25, 12, 9, 4, 1, 7, 20]
}, {
name: 'Arrests',
data: [3, 1, 2, 0, 3, 6, 10, 3, 0, 0, 1, 3, 5]
}]
});
});