Responsive Charts
Hi
I'm trying to make charts responsive in APEX 4.2.1.
The problem is that you can't define percentage values in the apex builder for the width and the height of the chart.
Now when I look in the javascript source code (#IMAGE_PREFIX#libraries/apex/widget_chart.js), I see that the code is there to use precentage values and make it responsive, but I can't use it in the builder.
I implemented a work around, but this is probably not the best way to solve the issue:
$('#CHART_chart').empty();
(function(){apex.widget.chart("CHART",{"type":"FLASH_PREFERRED","swfFile":"\u002Fo\u002Fflashchart\u002Fanychart_6\u002Fswf\u002FOracleAnyChart.swf","preloaderFile":"\u002Fo\u002Fflashchart\u002Fanychart_6\u002Fswf\u002FPreloader.swf","width":"100%","height":"99%","regionId":"6993781449104204150"});})();
I delete the orignal chart and re-create it with the same code as apex uses only with percentage values for the width and the height. The regionId should still be dynamically retrieved.
Of course this not the best solution because it does the same code twice (and ajax request).
So my question is: does anyone have a better solution?
It would be nice if you could use percentage values in the next release of apex. :)
Greetings
Stijn VR
Edited by: Stijn on 18-jan-2013 1:19