Make charts resizable
When a layout is fluid then having the charts resize automatically would appropriate (as OpenFlashChart does).
![](https://secure.gravatar.com/avatar/d41d8cd98f00b204e9800998ecf8427e?size=40&default=https%3A%2F%2Fassets.uvcdn.com%2Fpkg%2Fadmin%2Ficons%2Fuser_70-6bcf9e08938533adb9bac95c3e487cb2a6d4a32f890ca6fdc82e3072e0ea0368.png)
Version 2.1 released
-
Anonymous commented
@Sam Blows - your solution is great but will not work on IE9. The chart catches the mouse events and prevents the click on the jQueryUI resize handlers to start a drag. You could solve this by setting the background color of the handlers to some color (not transparent) and setting the opacity to 0.
-
Sam Blowes commented
Found this today, might be useful for those reading this.
-
Greatmedia commented
egret230: not bad. I am waiting for a new release of highcharts if that takes to long i might go with your fix until the next release.
-
egret230 commented
I'm kind of already doing this using JQUERY UI:
http://jqueryui.com/demos/resizable/Before creating the chart, I first destroy() the resizable that I had previously added.
Then, after creating the chart, I add it back in:
$("#actual_chart").resizable({
minWidth: 500,
minHeight: 350,
containment: '#chart_container',
stop: function(event, ui) { BuildChart(); }
});When someone resizes the chart, I call the BuildChart() function to re-draw the chart in the now resized dive.
It works pretty good!
-
Greatmedia commented
+1!