highcharts - Very wide columns in stacking column graph -
if 1 of these graphs contains more 1 value on xaxis (for example "data":[[52,1], [100,1]]), more distance between them, greater becomes columns. how rid problem?
$(function () { $('#container').highcharts({ chart: { type: 'column', }, xaxis: { title: { text: 'value' } }, yaxis: { min: 0, }, legend: { }, tooltip: { }, plotoptions: { column: { stacking: 'normal', } }, series: [{"name":"runcontractid = 316 name","stack":109,"data":[[52,1], [100,1]],"type":"column"},{"name":"runcontractid = 314 name","stack":109,"data":[[49,1]],"type":"column"},{"name":"runcontractid = 472 name","stack":109,"data":[[49,1]],"type":"column"},{"name":"runcontractid = 327 name","stack":109,"data":[[49,1]],"type":"column"},{"name":"runcontractid = 476 name","stack":109,"data":[[52,1]],"type":"column"},{"name":"runcontractid = 299 name","stack":109,"data":[[52,1]],"type":"column"},{"name":"runcontractid = 298 name","stack":109,"data":[[52,1]],"type":"column"},{"name":"runcontractid = 469 name","stack":109,"data":[[56,1]],"type":"column"},{"name":"runcontractid = 479 name","stack":109,"data":[[56,1]],"type":"column"},{"name":"runcontractid = 500 name","stack":109,"data":[[59,1]],"type":"column"},{"name":"runcontractid = 320 name","stack":109,"data":[[59,1]],"type":"column"},{"name":"runcontractid = 600 name","stack":109,"data":[[59,1]],"type":"column"},{"name":"runcontractid = 326 name","stack":109,"data":[[59,1]],"type":"column"},{"name":"runcontractid = 642 name","stack":109,"data":[[59,1]],"type":"column"},{"name":"runcontractid = 312 name","stack":109,"data":[[64,1]],"type":"column"},{"name":"runcontractid = 480 name","stack":109,"data":[[48,1]],"type":"column"}] }); });
found solution - add zeros @ blank points.
you can set pointwidth parameter
http://api.highcharts.com/highcharts#plotoptions.column.pointwidth
edit: pointrange solves problem http://jsfiddle.net/umpbl/4/
plotoptions: { column: { pointrange:1, stacking: 'normal', } },
Comments
Post a Comment