Crime
Short bar chart to mark rise or fall in crime during a particular year.
by Adam Nekola
HTML
<script src="http://code.highcharts.com/highcharts.js"></script>
<script src="http://code.highcharts.com/modules/exporting.js"></script>
<div id="container" style="min-width: 400px; height: 110px; margin: 0 auto"></div>
JavaScript
$(function () {
var chart;
$(document).ready(function() {
chart = new Highcharts.Chart({
chart: {
renderTo: 'container',
type: 'column'
},
plotOptions: {
column: {
color: '#cc0000'
}
},
exporting: {
enabled: false
},
title: {
text: ''
},
legend: {
enabled: false
},
xAxis: {
categories: ['1993', '1994', '1995', '1996', '1997', '1998', '1999']
},
yAxis: {
labels: {
enabled: false
},
title: {
text: ""
}
},
tooltip: {
formatter: function() {
return ''+
this.series.name +': '+ this.y +'';
}
},
credits: {
enabled: false
},
series: [{
name: 'Joe',
data: [3, 4, 4,
{
y:-2,
color: '#00aa00'
}, 2,
{
y:-5,
color: '#00aa00'
},
{
y:-7,
color: '#00aa00'
}]
}]
});
});
});