Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Responsive Charts

Stijn Van RaesJan 18 2013 — edited Jan 20 2013
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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 17 2013
Added on Jan 18 2013
2 comments
578 views