Pounds of WAter
by jbenedict
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: 310px; max-width: 800px; height: 400px; margin: 0 auto"></div>
JavaScript
$(function () {
$('#container').highcharts({
chart: {
type: 'bar'
},
title: {
text: 'Gallons of water needed to produce one pound of food'
},
subtitle: {
text: 'Source: Water Education Foundation Study <br> By James Benedict'
},
xAxis: {
categories: ['Gallons of Water'],
title: {
text: null
}
},
yAxis: {
min: 0,
title: {
text: 'Gallonws of Water',
align: 'high'
},
labels: {
overflow: 'justify'
}
},
tooltip: {
valueSuffix: ' gallons'
},
plotOptions: {
bar: {
dataLabels: {
enabled: true
}
}
},
legend: {
layout: 'vertical',
align: 'right',
verticalAlign: 'top',
x: -40,
y: 85,
floating: true,
borderWidth: 1,
backgroundColor: ((Highcharts.theme && Highcharts.theme.legendBackgroundColor) || '#FFFFFF'),
shadow: true
},
credits: {
enabled: false
},
series: [{
name: 'Tofu',
color: '#82786F',
data: [220]
},
{
name: 'Wheat Flower',
color: '#9ADCC6',
data: [180]
},
{
name: 'Beef',
color: '#CD894E',
data: [2500]
}, {
name: 'Chicken',
color: '#44697D',
data: [660]
}]
});
});