This discussion is archived
12 Replies Latest reply: Sep 12, 2013 1:20 AM by nvncro RSS

Apex 4.2 - Where is the flash chart region source?

742417 Newbie
Currently Being Moderated
I just noticed on apex.oracle.com (4.2) that I couldn't find the region source for flash charts. I expected to find it under the Region Definition tab.

Has this moved or will it be included in a later release?
  • 1. Re: Apex 4.2 - Where is the flash chart region source?
    Hilary Expert
    Currently Being Moderated
    Hi Christoph,

    In 4.2, the Flash chart region source is no longer visible on the Edit Region page, which is similar to many other components in Application Builder. We no longer embed the charts using <object>/<embed> tags, and instead now use the AnyChart JavaScript Integration Library to embed the chart in a page. If your original Flash chart region source contained any custom code, which you wish to access, you can use the APEX_APPLICATION_PAGE_REGIONS view to query the data for the region in question using SQL Workshop, using a query similar to the following:
    select page_id, region_name, region_source from apex_application_page_regions
    where application_id = :APP_ID
    and source_type_code in ('FLASH_CHART','FLASH_CHART5') 
    ...where :APP_ID will be your application ID.

    When upgrading to 4.2, your Flash 5 charts have automatically been upgraded to use the latest version of Flash charts, AnyChart 6. If you manually run the "Upgrade Application" wizard, to upgrade your Flash 3 charts to the latest version, then the contents of the original region source will be lost. So if you believe there's custom code in the region source which you wish to retain, query the APEX_APPLICATION_PAGE_REGIONS view before

    This change in behaviour will be listed on our Release Notes for 4.2.

    Regards,
    Hilary
  • 2. Re: Apex 4.2 - Where is the flash chart region source?
    742417 Newbie
    Currently Being Moderated
    Hi Hilary,
    thanks for the quick response and the clarification.

    My application has two charts, but the query you suggested returned null values for region_source.
    select page_id, region_name, region_source from apex_application_page_regions
    where application_id = 16120
    and source_type_code in ('FLASH_CHART','FLASH_CHART5');
    My workspace is cmr
    cruepprich@gmail.com / cmrtest.

    Regards,
    Christoph
  • 3. Re: Apex 4.2 - Where is the flash chart region source?
    Hilary Expert
    Currently Being Moderated
    Hi Christoph,

    Can I just check something with you - did you create your application after the 4.2 upgrade, and generate new Flash charts in that application? If so, then this would explain why the results you are seeing from the query show no values in the region_source. Just to clarify things, for new Flash 6 charts generated in 4.2, the region source will be empty and not visible on the Edit Region page. My suggestion to query the view is purely for users who wish to access the region source of their old Flash charts, in case they contain any custom code which they wish to retain. So if your charts are new, then the result you get from your query is correct. If you view the page source, you'll notice a 'apex.widget.chart' JavaScript call towards the end of the page, which is how we now embed charts for 4.2.

    I hope this helps.

    Regards,
    Hilary
  • 4. Re: Apex 4.2 - Where is the flash chart region source?
    742417 Newbie
    Currently Being Moderated
    Hilary,
    i created the app before the upgrade to 4.2, but the chart after the upgrade. So your explanation makes sense.

    Thanks for your help.

    BTW: I checked out your charts demo page. Good stuff!

    Christoph
  • 5. Re: Apex 4.2 - Where is the flash chart region source?
    Hilary Expert
    Currently Being Moderated
    No worries, Christoph,

    Happy to help, and thanks for the clarification on when the charts were created....and it's also good to know my sample application is proving useful for people! It requires some updating, in order to take in account some of the new functionality with 4.2, but other tasks are a higher priority right now. I'll ensure I get it updated as soon as possible.

    Regards,
    Hilary
  • 6. Re: Apex 4.2 - Where is the flash chart region source?
    rlm Newbie
    Currently Being Moderated
    In older APEX versions i could dynamically set the height of a gantt chart region to a page_item value in region source. (height="&P115_CHART_HEIGHT.")

    How can i do this in APEX 4.2?

    Thanks,

    Rob
  • 7. Re: Apex 4.2 - Where is the flash chart region source?
    rlm Newbie
    Currently Being Moderated
    To dynamically change the height of the Gantt chart in Version 4.2 I added the following java script to a dynamic action. Not sure if this is best way but it works.

    // get the div element
    d = document.getElementById('chart__0');
    // set the height
    d.style.height="&P111_GANTT_HEIGHT.px";
  • 8. Re: Apex 4.2 - Where is the flash chart region source?
    Hilary Expert
    Currently Being Moderated
    Hi Rob,

    Sorry, I meant to respond to your last posting before now. I had actually updated one of the examples in my sample application to include a demo of setting the chart height via JavaScript, http://apex.oracle.com/pls/apex/f?p=36648:56 , but never got around to updating this thread. I've used the following code snippet in a dynamic action on my page:
    $('#Rxxxxxxxxxxxxxxxxxxx_chart > object', apex.gPageContext$).attr('height',$v('PXX_HEIGHT'));
    ...where Rxxxxxxxxxxxxxxxxxxx_chart would be replaced with the ID of the chart region, and PXX_HEIGHT would be replaced with the name of the page item used to set the chart height.


    Regards,
    Hilary
  • 9. Re: Apex 4.2 - Where is the flash chart region source?
    TAC Newbie
    Currently Being Moderated
    hfarrell wrote:
    Hi Rob,

    Sorry, I meant to respond to your last posting before now. I had actually updated one of the examples in my sample application to include a demo of setting the chart height via JavaScript, http://apex.oracle.com/pls/apex/f?p=36648:56 , but never got around to updating this thread. I've used the following code snippet in a dynamic action on my page:
    $('#Rxxxxxxxxxxxxxxxxxxx_chart > object', apex.gPageContext$).attr('height',$v('PXX_HEIGHT'));
    ...where Rxxxxxxxxxxxxxxxxxxx_chart would be replaced with the ID of the chart region, and PXX_HEIGHT would be replaced with the name of the page item used to set the chart height.


    Regards,
    Hilary
    Hillary,

    I am trying to apply what you've supplied here but can't seem to get it to work. I am working in APEX 4.2.1.

    Here are the steps I followed.

    - created a page item - P6_HEGHT as a select list with various predefined sizes
    - Created a dynamic action on page item P6_HEIGHT
    - event = change
    - selection type = item
    - item = P6_HEIGHT
    - condition = none
    - action type = execute javascript code
    - fire when event result is true
    - fire on page load = Yes
    - entered
    $('#R2797622135391715_chart > object', apex.gPageContext$).attr('height',$v('P6_HEIGHT'));
    - queried the apex_application_page_regions table and found the region id was "2797622135391715" and replaced the x's in your example
    - selection type = item
    - item = P6_HEIGHT


    Can you point out what I screwed up or step through the specific steps for creating this dynamic action?

    Any help would be appreciated.

    Tom
  • 10. Re: Apex 4.2 - Where is the flash chart region source?
    TAC Newbie
    Currently Being Moderated
    Hillary,

    Never mind. I've got it working now. I didn't realize I had changed the chart type to HTML . As soon as I moved it back to flash it worked perfectly.

    Tom
  • 11. Re: Apex 4.2 - Where is the flash chart region source?
    sus2013 Newbie
    Currently Being Moderated

    Hi

     

    I have a smilar question, I would like to change the CHAR's region title ( dynamically based on the value of another APEX list item P38_DESK ). How to do this in APEX 4.2 ?  I could not find the region source and Page Items to Submit property anymore.

     

    Thanks a lot.

    Susanna

  • 12. Re: Apex 4.2 - Where is the flash chart region source?
    nvncro Newbie
    Currently Being Moderated

    Hi Hillary,

     

    can you tell me is there any function I can call from javascript that can change chart type ?

    Where did you find this function to call for height and width?

     

    $('#R2797622135391715_chart > object', apex.gPageContext$).attr('height',$v('P6_HEIGHT'));

     

    I have a problem with changing chart type

    https://forums.oracle.com/thread/2580202

     

    Thanks

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points