16/17 Degrees
by Kathryn Atwood
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 () {
Highcharts.chart('container', {
chart: {
type: 'column'
},
title: {
text: '2016/2017 Academic Year Degrees Awarded'
},
xAxis: {
categories: ['Summer 2016', 'Fall 2016', 'Spring 2017']
},
yAxis: {
min: 0,
title: {
text: 'Degrees Awarded'
},
stackLabels: {
enabled: true,
style: {
fontWeight: 'bold',
color: (Highcharts.theme && Highcharts.theme.textColor) || 'gray'
}
}
},
legend: {
align: 'center',
x: -30,
verticalAlign: 'bottom',
y: 25,
floating: false,
backgroundColor: (Highcharts.theme && Highcharts.theme.background2) || 'white',
borderColor: '#CCC',
borderWidth: 0,
shadow: false
},
tooltip: {
headerFormat: '<b>{point.x}</b><br/>',
pointFormat: '{series.name}: {point.y}<br/>Total: {point.stackTotal}'
},
plotOptions: {
column: {
stacking: 'normal',
dataLabels: {
enabled: true,
color: (Highcharts.theme && Highcharts.theme.dataLabelsColor) || 'white'
}
}
},
series: [{
name: 'Arts and Humanities',
data: [40, 3, 4]
}, {
name: 'Business and Economics',
data: [60, 2, 3]
}, {
name: 'Education',
data: [13, 4, 4]
}, {
name: 'Science and Technology',
data: [38, 4, 4]
}, {
name: 'Social Science',
data: [75, 4, 4]
}]
});
});