2 Replies Latest reply on Jun 6, 2012 4:11 AM by 786777

    can a chart be dynamically refreshed?

      I am using Apex 4.1, and it seems binding a refresh action with a chart region as target is not supported. The event to which I am trying to react is a selection change in a drop-down box. The binding works alright e.g for displaying an alert, but trying to refresh the region has no effect.
        • 1. Re: can a chart be dynamically refreshed?
          I sorta figured it out from this blog post

          First one needs to edit the chart region source and add the following at the end:
          <script type="text/javascript">
          function refresh_chart() {
            var chartName = '#CHART_NAME#'.substring(1);
            apex_RefreshFlashChart(&APP_PAGE_ID., chartName, 'en');
          Then add the following javascript function definition to your page header:
          function change_handler(item) {
            var get = new htmldb_Get(null,$v('pFlowId'), 'APPLICATION_PROCESS=Do Nothing',0);
            get.add(item.id, item.value);
            var ret = get.get();
          finally, set your item "Page Action when Value Changed" to "none", and its "HTML Form Element Attributes" to
          <b>but</b> I was hoping for a simpler, more direct support from dynamic actions; am I missing something ?
          • 2. Re: can a chart be dynamically refreshed?
            Cool! It just works as expected.

            Jichao Li