highcharts - Is modifying chart.hasUserSize a bad idea after calling Chart.setSize()? -


when using chart.setsize() i've noticed value chart.hasusersize gets set true. once hasusersize = true chart no longer respond resize events if window changes dimensions if set hasusersize false again responds resize events.

i've created ux allows user "expand" chart container 100% width once i've called setsize() no longer auto resizes until remove hasusersize=true value.

since it's not documented part of api should considered hack? problem don't see documented way re-enable resizing code natively in highcharts once you've called setsize().

it's working want right don't want leave wart in code may come bite me in future versions of highcharts.

http://jsfiddle.net/fzcnk/

chart.hasusersize = false 

here's jsfiddle that, when window resized, demonstrates i'm talking included "hack". resize window/chart pane before clicking anything, click size button , resize , it'll respond on width. comment out "chart.hasusersize = false" lines , try resizing. it's not perfect example gets point across use of hasusersize = false.

is right thing reclaim sizing behavior after calling setsize()?


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -