Add value to the bar top for bar chart
Description
The following code shows how to add value to the bar top for bar chart.
Example
<!DOCTYPE html>
<html>
<head>
<script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js'></script>
<script type='text/javascript'>
$(function () {<!--from w ww. j a v a2s . c o m-->
$('#container').highcharts({
chart: {
type: 'bar'
},
plotOptions: {
bar: {
dataLabels: {
enabled: true
}
}
},
series: [{
name: 'Year 1800',
data: [107, 131, 65, 293, 2]
}, {
name: 'Year 1900',
data: [133, 56, 947, 1408, 6]
}, {
name: 'Year 2008',
data: [973, 14, 4054, 732, 34]
}]
});
});
</script>
</head>
<body>
<script src="http://code.highcharts.com/highcharts.js"></script>
<div id="container" style="min-width: 310px; height: 400px; max-width: 800px; margin: 0 auto"></div>
</body>
</html>