score:3

The problem is seems to be with the d3 version.

Try using <script src="//d3js.org/d3.v4.0.0-alpha.23.min.js"></script>.

Source: http://d3js.org/d3.v4.0.0-alpha.23.min.js

console.log("the script is executing")
var format = d3.format(",d");

d3.select("h1")
  .transition()
  .duration(2500)
  .on("start", function repeat() {

    d3.active(this)
      .tween("text", function() {
        var that = d3.select(this),
          i = d3.interpolateNumber(that.text().replace(/,/g, ""), Math.random() * 1e6);
        return function(t) {
          that.text(format(i(t)));
        };
      })
      .transition()
      .delay(1500)
      .on("start", repeat);
  });
h1 {
  font: 400 120px/500px"Helvetica Neue";
  text-align: center;
  width: 960px;
  height: 500px;
  margin: 0;
}
<script src="//d3js.org/d3.v4.0.0-alpha.23.min.js"></script>
<h1>0</h1>


More Query from same tag