Created
May 2, 2019 15:41
-
-
Save gpDA/61358a2c0a530e41f654648cf9bfc605 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
// ./components/Chart/Chart.js | |
constructor() { | |
super(); | |
// initialize array with default value (1,2,3) respectively | |
let inital_line_1 = new Array(31).fill(1); | |
let inital_line_2 = new Array(31).fill(2); | |
let inital_line_3 = new Array(31).fill(3); | |
this.state = { | |
inital_line_1: inital_line_1, | |
inital_line_2: inital_line_2, | |
inital_line_3: inital_line_3, | |
counter: 0, | |
} | |
//update the function for 30 seconds | |
// TODO: MY BAD 30 --> 10 | |
setInterval(this.updateArray.bind(this), 10 * 1000); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment