LoginSignup
4
4

More than 5 years have passed since last update.

D3.jsを使ってランダムなデータセットを作成する

Posted at

d3.js でテスト用に、5000個のランダムなデータセットを作成

var w = 1000;
var h = 1000;
var data = d3.range(5000).map(function() {
  return {x: Math.floor(Math.random() * w) , y: Math.floor(Math.random() * h)};
});
4
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
4