var smoothie = new SmoothieChart(); smoothie.streamTo(document.getElementById(“mycanvas”)); var line1 = new TimeSeries(); var line2 = new TimeSeries(); setInterval(function() { line1.append(new Date().getTime(), Math.random()); line2.append(new Date().getTime(), Math.random()); }, 1000); smoothie.addTimeSeries(line1); smoothie.addTimeSeries(line2); smoothie.streamTo(document.getElementById(“mycanvas”), 1000 /delay/); var smoothie = new SmoothieChart({ grid: { strokeStyle:’rgb(125, 0, 0)’, fillStyle:’rgb(60, 0, 0)’, lineWidth: 1, millisPerLine: 250, verticalSections: 6, }, labels: { fillStyle:’rgb(60, 0, 0)’ } }); smoothie.addTimeSeries(line1, { strokeStyle:’rgb(0, 255, 0)’, fillStyle:’rgba(0, 255, 0, 0.4)’, lineWidth:3 }); smoothie.addTimeSeries(line2, { strokeStyle:’rgb(255, 0, 255)’, fillStyle:’rgba(255, 0, 255, 0.3)’, lineWidth:3 }); 데이터를 추가한다 */ ?> exit; connect_errno) { // die("Connection failed: " . $mysqli->connect_error); } $query = "insert into finedust (dt_create, pm010, pm025, pm100) values(now(),'$d010', '$d025', '$d100')"; if (!$mysqli->query($query)) { // printf("Error: %s\n", $mysqli->error); } $mysqli->close(); // echo "Success ".time(); } ?>