Forum Stats

  • 3,853,608 Users
  • 2,264,246 Discussions
  • 7,905,414 Comments

Discussions

dynamic and 100% HTML5 chart width in apex 4.2

matjazc
matjazc Member Posts: 4 Blue Ribbon
edited Jul 21, 2014 6:38PM in APEX Discussions

I am having problems with HTML5 chart size in Apex 4.2.

Apex Engine generates a call like this before the end of the page:

(function(){apex.widget.chart("R2294624206389386",{"type":"SVG_ONLY","width":"800","height":"200","regionId":"2294624206389386"});})();

This gets output from #GENERATED_JAVASCRIPT# in page template and in turn creates the chart.

Due to field wwv_flow_flash_charts_5.chart_width being numeric there is no way I could successfully enter and save value "100%" for chart width,  so my chart never gets expanded to fit the containing div element.

Does anyone have a portable solution for this issue?

Best Answer

  • peter_raganitsch
    peter_raganitsch Member Posts: 1,076 Silver Trophy
    Answer ✓

    Leave chart width and height empty.

    Although those fields show a required-asterisk, they aren't required anymore.

    Now the chart should automatically adapt to the screen size. My tests showed that this works not very well depending on the templates are used.

    Just try it, hope you are lucky ;-)

    Regards,

    Peter

Answers

  • peter_raganitsch
    peter_raganitsch Member Posts: 1,076 Silver Trophy
    Answer ✓

    Leave chart width and height empty.

    Although those fields show a required-asterisk, they aren't required anymore.

    Now the chart should automatically adapt to the screen size. My tests showed that this works not very well depending on the templates are used.

    Just try it, hope you are lucky ;-)

    Regards,

    Peter

  • matjazc
    matjazc Member Posts: 4 Blue Ribbon

    That really works!

    Now the value "100%" is generated by apex engine:

    (function(){apex.widget.chart("R49845512559956825460",{"type":"SVG_ONLY","width":"100%","height":"200","regionId":"49845512559956825460"});})();

    Thanks a lot and kind regards,

    Matjaz

This discussion has been closed.