Javascript examples for highcharts:Width
Get a stacked graph to the full width?
<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 () {/* ww w . j a v a 2 s .c o m*/ $('#container').highcharts({ chart: { type: 'bar', marginLeft:0 }, title: { text: 'votes' }, credits: { enabled: false }, xAxis: { categories: ['Apples'], title: { enabled: false } }, exporting: { enabled: false }, yAxis: { endOnTick: false, tickInterval:23, min: 0, max:23, title: { enabled: false }, gridLineColor: '#fff', lineColor: '#fff' }, legend: { backgroundColor: '#FFFFFF', reversed: true }, plotOptions: { series: { stacking: 'normal' } }, series: [{ name: 'Yes', data: [20] },{ name: 'No', data: [3] }] }); }); </script> </head> <body> <script src="https://code.highcharts.com/highcharts.js"></script> <script src="https://code.highcharts.com/modules/exporting.js"></script> <div style="width: 200px; height: 200px;"> <div id="container" style="min-width: 300px; height: 200px; margin: 0 auto"></div> </div> </body> </html>