| Page 1 of 1 | [ 3 posts ] |
|
Thanks for your reply and sorry for my poor english.
After the browser window has been resized, the size of chart DIV block has changed also, is there any way to notify chart to resize to fit the new DIV range? I've tried call render('#divid') in body.onresize() function, but it doesn't work, or even it seems like doesn't effect anything. Anyone could pls give me some clue? Thanks. |
|
The chart has width/height attributes. You can update them explicitly.
Code: mychart.set('width', myNewWidth); mychart.set('height', myNewHeight); Thanks, Tripp |
|
Yes. thanks Tripp again.
I've found the solution in another thread also. It works great!. function bindChartResizeHandler(obj) { if (!obj || !obj.cfg || !obj.param) return; var _obj = obj; $(window).bind('resize.'+_obj.param.render, function() { if (!_obj.chart) return; var divObj = $(_obj.param.render); var width = divObj.prop('clientWidth'); var height = divObj.prop('clientHeight'); _obj.chart.set('width', width); _obj.chart.set('height', height); console.log('resize:'+width+','+height); }).triggerHandler('resize'); } |
| Page 1 of 1 | [ 3 posts ] |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info
Powered by phpBB® Forum Software © phpBB Group