Created
November 4, 2019 16:09
-
-
Save raf-sh/e04978ad915248caf7311271d31b5184 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function randomIntFromInterval(min, max) { | |
return Math.floor(Math.random() * (max - min + 1) + min); | |
} | |
function generateData() { | |
var data_list = []; | |
var random = Math.floor(Math.random() * 10); | |
for (var i = 0; i < random; i++) { | |
data_list.push({ | |
name: i, | |
x_axis: randomIntFromInterval(-100, 100), | |
y_axis: randomIntFromInterval(-100, 100), | |
radius: randomIntFromInterval(3, 15) | |
}); | |
} | |
return data_list; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment