Highcharts Demo
author(s): Torstein Hønsi
by cperezbrito
HTML
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<script src="https://code.highcharts.com/modules/export-data.js"></script>
<div id="container" style="min-width: 310px; max-width: 800px; height: 400px; margin: 0 auto"></div>
JavaScript
Highcharts.chart('container', {
chart: {
type: 'bar'
},
title: {
text: 'Reported Hate Crimes in Florida By Type (2016)'
},
subtitle: {
text: 'Source: <a href="https://ucr.fbi.gov/hate-crime/2016/resource-pages/download-files">FBI UCR (Table 13 Fl) </a>'
},
xAxis: {
categories: ['Race/Ethnicity', 'Religion', 'Sexual Orientation', 'Disability', 'Gender Identity'],
title: {
text: null
}
},
yAxis: {
min: 0,
title: {
text: 'Number of Reported Incidents',
align: 'high'
},
labels: {
overflow: 'justify'
}
},
plotOptions: {
bar: {
dataLabels: {
enabled: true
}
}
},
legend: {
layout: 'vertical',
align: 'right',
verticalAlign: 'top',
x: -40,
y: 80,
floating: true,
borderWidth: 1,
backgroundColor: ((Highcharts.theme && Highcharts.theme.legendBackgroundColor) || '#FFFFFF'),
shadow: true
},
credits: {
enabled: false
},
series: [{
data: [43, 19, 32, 1, 1]
}]
});