title: d3 function (d) not being called
body: <p>It's my first time using d3, and I'm trying to dynamically increase the padding for circles in a D3 packing chart, using the below function:</p>
  
  <pre><code>var pack = d3.layout.pack()
          .padding(function(d) {
                console.log(d.padding);
                return d.padding;
            })
          .size([diameter, diameter])
          .value(100),
          arc = d3.svg.arc().innerRadius(0),
          pie = d3.layout.pie;
  </code></pre>
  
  <p>The function in the padding parameter above does not run, and instead padding is defaulted to 0. When I place the function in <code>.value()</code> however, it runs correctly and logs <code>d.padding</code> to the console as expected. Why is this function not running in the padding parameter but runs fine in the value parameter?</p>
  
  <p>Possibly related to <a href="https://stackoverflow.com/questions/50470731/d3-pack-layout-with-variable-padding">this</a> question.</p>