SSU Staff Gender Ethnicity
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; max-width: 600px; height: 400px; margin: 0 auto"></div>
JavaScript
$(function () {
// Create the chart
$('#container').highcharts({
chart: {
type: 'pie'
},
title: {
text: 'SSU Staff Gender and Ethnicity Statistics, Spring 2016 '
},
subtitle: {
text: 'Click the slices to view ethnicities.'
},
plotOptions: {
series: {
dataLabels: {
enabled: true,
format: '{point.name}: {point.y}'
}
}
},
tooltip: {
headerFormat: '<span style="font-size:11px">{series.name}</span><br>',
pointFormat: '<span style="color:{point.color}">{point.name}</span>: <b>{point.y}</b> staff members<br/>'
},
series: [{
name: 'Gender',
colorByPoint: true,
data: [{
name: 'Female',
y: 652,
drilldown: 'Female'
}, {
name: 'Male',
y: 477,
drilldown: 'Male'
}, {
name: 'Unreported',
y: 6,
drilldown: 'Unreported'
}]
}],
drilldown: {
series: [{
name: 'Female',
id: 'Female',
data: [
['Am. Indian', 2],
['Asian', 24],
['Black', 10],
['Hawaiian', 1],
['Hispanic/Latino', 96],
['Multiracial', 21],
['Unknown', 58],
['White', 440]
]
}, {
name: 'Male',
id: 'Male',
data: [
['Am. Indian', 3],
['Asian', 15],
['Black', 20],
['Hawaiian', 2],
['Hispanic/Latino', 64],
['Multiracial', 13],
...