Chapter 4: Adjust Column Colors and Data Labels (1)
Top 10 countries with patents granted
by JoeKuan
HTML
<script type="text/javascript" src="http://code.highcharts.com/highcharts.js"></script>
<body>
<div style="margin: 5px 60px 5px 5px; " id='container'></div>
</body>
JavaScript
$(document).ready(function() {
var chart = new Highcharts.Chart({
chart: {
renderTo: 'container',
type: 'column',
spacingBottom: 25,
borderWidth: 1
},
title: {
text: 'Number of Patents Granted in 2011'
},
credits: {
position: {
align: 'left',
x: 20
},
href: 'http://www.uspto.gov',
text: 'Source: U.S. Patent & Trademark Office'
},
xAxis: {
categories: [ 'United States', 'Japan', 'South Korea', 'Germany', 'Taiwan',
'Canada', 'France', 'United Kingdom', 'China', 'Italy' ]
},
yAxis: {
title: {
text: 'No. of Patents'
}
},
series: [{
showInLegend: false,
data: [ 121261, 48256, 13239, 12968, 9907, 5754, 5022, 4924, 3786, 2333 ]
}]
});
});