16-17 degrees
author(s):
Torstein Hønsi
by Kathryn Atwood
HTML
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/data.js"></script>
<script src="https://code.highcharts.com/modules/drilldown.js"></script>
<div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
JavaScript
$(function () {
// Create the chart
$('#container').highcharts({
chart: {
type: 'column'
},
title: {
text: 'Degrees Awarded, AY 2015-2016'
},
subtitle: {
text: ''
},
xAxis: {
type: 'category'
},
yAxis: {
title: {
text: 'Number of degrees awarded'
}
},
legend: {
enabled: false
},
plotOptions: {
series: {
borderWidth: 0,
dataLabels: {
enabled: true,
format: '{point.y:f}'
}
}
},
tooltip: {
headerFormat: '<span style="font-size:11px">{series.name}</span><br>',
pointFormat: '<span style="color:{point.color}">{point.name}</span>: <b>{point.y:f}</b> of total<br/>'
},
series: [{
name: 'Academic Schools',
colorByPoint: true,
data: [{
name: 'Arts and Humanities',
y: 373,
drilldown: 'Arts and Humanities'
}, {
name: 'Business and Economics',
y: 477,
drilldown: 'Business and Economics'
}, {
name: 'Education',
y: 105,
drilldown: 'Education'
}, {
name: 'Science and Technology',
y: 405,
drilldown: 'Science and Technology'
}, {
name: 'Social Science',
y: 761,
drilldown: 'Social Science'
}, {
name: 'University Wide',
y: 1,
drilldown: 'University Wide'
}]
}],
drilldown: {
series: [{
name: 'Arts and Humanities',
id: 'Arts and Humanities',
data:...