Javascript examples for highcharts:Column Chart
Column chart customization
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://code.jquery.com/jquery-1.9.1.js"></script> <script type="text/javascript"> $(function () {/*from w ww . j a v a 2s . c o m*/ $('#container').highcharts({ chart: { type: 'column' }, title: { text: 'Stacked column chart' }, xAxis: { categories: ['Apples', 'Oranges', 'Pears', 'Grapes', 'Bananas'] }, yAxis: { min: 0, title: { text: 'Total fruit consumption' } }, tooltip: { pointFormat: '<span style="color:{series.color}">{series.name}</span>: <b>{point.y}</b> ({point.percentage:.0f}%)<br/>', shared: true }, plotOptions: { column: { stacking: 'percent' } }, series: [ { name: 'dummy data', data: [5, 3, 4, 7, 2], color:'gray', showInLegend: false, enableMouseTracking: false }, { name: 'Series 1', color: 'red', data: [2,null,null,null,null] }, { name: 'Series 2', color: 'orange', data: [null,2,null,null,null] }, { name: 'Series 3', color: 'yellow', data: [null,null,2,null,null] }, { name: 'Series 4', color: 'green', data: [null,null,null,2,null] }, { name: 'Series 5', color: 'blue', data: [null,null,null,null,1] } ] }); }); </script> </head> <body> <script src="https://code.highcharts.com/highcharts.js"></script> <script src="https://code.highcharts.com/modules/exporting.js"></script> <div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div> </body> </html>