title: add column in D3.js
body: <p>I am using <code>D3.js</code> to draw 4 columns inside a row, I have three column with data and I want to add 1 more add the end. My <code>html</code> file is like this.</p>
  
  <pre><code>&lt;div class="container"&gt; 
    &lt;div class="feature"&gt;
      &lt;div class="row"&gt;
  
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;  
  </code></pre>
  
  <p>and my <code>Javascript</code> code is like this.</p>
  
  <pre><code>  function calculateNumber(){
      var json_url = "...";
      dataset = []; 
      d3.json(json_url, function(data) {
        dataset.push(intToString(data[0]["num_jobs"]));
        dataset.push(data[0]["cpuhour_tot"]);
        dataset.push(data[0]["cpuhour_tot"]);
          d3.select(".feature .row").selectAll("div")
            .data(dataset)
            .enter()
            .append("div")
            .attr("class", "col-xs-3")
            .text(function(d){ return d});
      });
  
      new_data = generateStatic();
  
      d3.select(".feature .row").selectAll("div")
        .data(new_data)
        .enter()
        .append("div")
        .attr("class", "col-xs-3")
        .text(function(d){ return d});
    }  
  </code></pre>
  
  <p>this code add 3 column perfect, now <code>new_data = generateStatic();</code> has the new data that I want to add.</p>
  
  <p>dataset and new_dat are different </p>
  
  <p>Now I want to add another div .. but the code no add any new div, simply rewrite the fist.</p>
  
  <p>I include the image where I mark where have to appear the new div</p>
  
  <p><a href="https://i.stack.imgur.com/YfLfO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YfLfO.png" alt="enter image description here"></a></p>
  
  <p>Any ideas? </p>