javascript - dojo chart height and width issue -
this javascript code dojo chart,whenever creating chart in separate html page working fine, when merging same piece of code in project svg taking width:400px , height:300px,but have given div width:200px , height:100px thing creating issue in project,i not been able change value, please me, in advance.
"dojox/charting/plot2d/columns", "dojox/charting/chart", "dojox/charting/themes/miaminice", "dojox/charting/axis2d/default", "dojox/charting/plot2d/markers", var chart = new chart("chartnode"); chart.addplot("default", {type: columns, enablecache: true,gap:10}); chart.addseries("series a", [50, 20, 30, 40, 10]); chart.settheme(theme); chart.render();
this html code
this looks when create chart node place not yet added/displayed in application. reason chart takes default size because can't compute (default size 400/300). solution make sure add chart node displayed @ initialization. other solution later resize chart calling chart.resize(width, height);