Plot a dynamic Graph using Jquery and Google Chart API
Here i used JQuery for updating div and Google Chart API for plotting graph
Source Code
Source Code text.php
session_start();
function insert_data($val)
{
for($i=0;$i<100;$i++)
{
if(!isset($_SESSION[v][$i]))
{
for($k=0;$k<100;$k++)
$_SESSION[v][$k]=mt_rand(0,120);
}
else
$_SESSION[v][$i]=$_SESSION[v][$i+1];
if($i!=0)
$str.=",";
$str.=$_SESSION[v][$i];
}
$_SESSION[v][100]=$val;
$str.=",$val";
return $str;
}
//print_r($_SESSION[v]);
$k=insert_data(date("i")+date("s")+mt_rand(10,22)-mt_rand(0,8));
?>
HTML
U Will Get source code in
http://csajjad.com/eg/gr_dynmc.php
Source Code
Source Code text.php
session_start();
function insert_data($val)
{
for($i=0;$i<100;$i++)
{
if(!isset($_SESSION[v][$i]))
{
for($k=0;$k<100;$k++)
$_SESSION[v][$k]=mt_rand(0,120);
}
else
$_SESSION[v][$i]=$_SESSION[v][$i+1];
if($i!=0)
$str.=",";
$str.=$_SESSION[v][$i];
}
$_SESSION[v][100]=$val;
$str.=",$val";
return $str;
}
//print_r($_SESSION[v]);
$k=insert_data(date("i")+date("s")+mt_rand(10,22)-mt_rand(0,8));
?>
HTML
U Will Get source code in
http://csajjad.com/eg/gr_dynmc.php
No comments:
Post a Comment