Ethnicity Count Template

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; max-width: 900px; margin: 0 auto"></div>

JavaScript

Highcharts.chart('container', {
    chart: {
        plotBackgroundColor: null,
        plotBorderWidth: null,
        plotShadow: false,
        type: 'pie'
    },
    title: {
        text: 'Fall 2015 Staff Diversity Data--Ethnicity'
    },
    tooltip: {
        pointFormat: '{series.name}: <b>{point.name}: {point.y}</b>'
    },
    plotOptions: {
        pie: {
            allowPointSelect: true,
            cursor: 'pointer',
            dataLabels: {
                enabled: true,
                format: '<b>{point.name}</b>: {point.y}',
                style: {
                    color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black'
                }
            }
        }
    },
    series: [{
        name: 'Staff',
        colorByPoint: true,
        data: [{
            name: 'AmInd',
            y: 4
        }, {
            name: 'Asian',
            y: 34
        }, {
            name: 'Black',
            y: 19
        }, {
            name: 'Hispanic',
            y: 97
        }, {
            name: 'Pacific Islander',
            y: 2
        }, {
            name: 'Two or More Ethnicities',
            y: 25
        }, {
            name: 'Unknown',
            y: 40
        }, {
            name: 'White',
            y: 512
        }]
    }]
});