title: Oracle APEX - D3.js 3d chart not rendering even though json data has been successfully loaded
body: <p>I am using Oracle Apex for this. I am trying to create a 3d bar chart like this with d3.js
  <a href="https://i.stack.imgur.com/s4HVz.png" rel="nofollow noreferrer">Image: 3d bar chart by https://vizhub.com/avinash021997/abab7e1b7e864bcda2a36f189fe0f287?edit=files&amp;file=index.html</a></p>
  <p>I loaded d3 js and css files. Then tested using code from vizhub and the chart is rendered nicely. That means the files have been loaded correctly. I have created a restful web service via APEX that is returning the JSON that I need. The array (newArr) is loaded in [{Key: , Values : [{key: , value: }]}] format as well that necessary for the 3d chart to work.</p>
  <p>My actual array from JSON - <a href="https://i.stack.imgur.com/cl95K.png" rel="nofollow noreferrer">Image: Array length - 169</a></p>
  <p>When I use a hardcoded array (array length - 2) it is loaded quickly. Even before the dynamic actions are fired and therefore, I guess the chart is rendered.</p>
  <p><a href="https://i.stack.imgur.com/pvw3d.png" rel="nofollow noreferrer">Image: Hardcoded array on top of other dynamic actions and actual one is loaded later</a></p>
  <p>How can I wait for the JSON data to come through completely before rendering the chart? I have created a new array to get the key value pairs as required. Please see my code below. Thanks in advance for your help!</p>
  <pre><code>var jsonArr = [];
  var jsonArrLen;
  var newArr = [];
  var chartHolder;
  var myChart;
  
  
  $.getJSON(&quot;my_link&quot;, function(json) {
      jsonArr = json.items;
      jsonArrLen = jsonArr.length;
  
      //console.log(jsonArr[i].name);
      newArr = jsonArr.map(item =&gt; ({key: item.name, values: [{key: item.part_no, value: item.util}]}));
      console.log(newArr);
      // Select chartholder
      chartHolder = d3.select(&quot;#chartholder&quot;);
      
      // Declare the chart component
      myChart = d3.x3d.chart.barChartMultiSeries();
      // Attach chart and data to the chartholder
      chartHolder
          .datum(newArr)
          .call(myChart);
  });
  </code></pre>