如何在 jsfiddle 中 运行 d3.js 编码

how to run d3.js code in jsfiddle

如何 运行 d3.js 在 js 中编码 fiddle。我创建了一个 fiddle 但它不起作用:

这是 link: https://jsfiddle.net/rajatmehta/tm5166e1/7/

var GenData = function(N, lastTime) {
  var output = [];
  for (var i = 0; i < N; i++) {
    output.push({
      value: Math.random() * 10,
      timestamp: lastTime
    });
    lastTime = lastTime + 1000;
  }

  return output;

}

您需要指向 https url - https://d3js.org/d3.v3.min.js instead of http://d3js.org/d3.v3.min.js

https://jsfiddle.net/csz8fje5/1/

links to jsfiddle must include code...