I have problem with my charts I've two variable php contain int data will change every second
<?php
$var1 = $_GET["id"];
$var2 = $_GET["id2"];
?>
I want to passing that variable into javascript ricksaw charts and i dont know how to do it
This is still random data the javascript
var container = '#rickshaw-realtime';
var seriesData = [
[],
[],
[]
];
var random = new Rickshaw.Fixtures.RandomData(100);
for (var i = 0; i < 50; i++) {
random.addData(seriesData);
}
This is the more code charts
series: [{
data: seriesData[0],
color: $.Pages.getColor('success-light', .5), // Get Pages contextual color
name: 'DB Server'
}, {
data: seriesData[1],
color: $.Pages.getColor('master-light'), // Get Pages contextual color
name: 'Web Server'
}]
and this is Update the graph with realtime data.
setInterval(function() {
random.removeData(seriesData);
random.addData(seriesData);
graph.update();
}, 1000);
please help me to solve this ?? to input that variable php into the javascript