Make charts resizable
When a layout is fluid then having the charts resize automatically would appropriate (as OpenFlashChart does).
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!