Last active
August 29, 2015 14:00
-
-
Save ESeufert/25ed84375568dd8ecb9b to your computer and use it in GitHub Desktop.
This file contains hidden or 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
var data = []; | |
// this is our data array | |
var startingDate = new Date(2012, 8, 18); | |
// this is a date object | |
for (var i = 0; i < 10; i++) { // loop 10 times to create 10 data objects | |
var tmpObj = {}; | |
// this is a temporary data object | |
tmpObj.date = new Date( | |
startingDate.getFullYear(), | |
startingDate.getMonth(), | |
startingDate.getDate()+i | |
); | |
// the data for this data object. Increment it from the starting date. | |
tmpObj.DAU = Math.round(Math.random() * 300); // random value. Round it to a whole number. | |
data.push(tmpObj); // push the object into our data array | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment