Javascript examples for highcharts:Bar Chart
drilldown with multiple parent series for bar chart
<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 () {// www . j a v a2s . co m $('#container').highcharts({ chart: { type: 'column' }, title: { text: 'Monthly Average Rainfall' }, subtitle: { text: 'Source: WorldClimate.com' }, xAxis: { categories: [ 'CAT 1', 'CAT2' ] }, yAxis: { min: 0, title: { text: 'Rainfall (mm)' } }, tooltip: { headerFormat: '<span style="font-size:10px">{point.key}</span><table>', pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' + '<td style="padding:0"><b>{point.y:.1f} mm</b></td></tr>', footerFormat: '</table>', shared: true, useHTML: true }, plotOptions: { column: { pointPadding: 0.2, borderWidth: 0 } }, series: [{ name: 'Tokyo', data: [{y:49.9, drilldown:'tokyo 1'}, {y:71.5, drilldown:'tokyo 2'}] }, { name: 'New York', data: [{y:49.9, drilldown:'ny 1'}, {y:71.5, drilldown:'ny 2'}] }], drilldown:{ series: [{ id: 'tokyo 1', data: [{y:39.9, name:'name1'}, {y:31.5, name:'name2'}] }, { id: 'tokyo 2', data: [{y:39.9, name:'name1'}, {y:31.5, name:'name2'}] }, { id: 'ny 1', data: [{y:39.9, name:'name1'}, {y:31.5, name:'name2'}] }, { id: 'ny 2', data: [{y:39.9, name:'name1'}, {y:31.5, name:'name2'}] }] } }); }); </script> </head> <body> <script src="https://github.highcharts.com/highcharts.js"></script> <script src="https://github.highcharts.com/modules/exporting.js"></script> <script src="https://github.highcharts.com/modules/drilldown.js"></script> <div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div> </body> </html>