I am currently trying to incorporate charts api into my project by
interfacing it with my MYSQL DB.I am using PHP..this is the code i
have written..It seems right to me but the chart does not get
displayed..would appreciate help in this matter
Thanks in advance.
Here is the code...
<html>
<?php
include("db.php");
$sql="SELECT * from test";
$result = mysql_query($sql);
echo "<img src='http://chart.apis.google.com/chart?chs=240x100 ";
echo "&chd=t:";
$rows = mysql_num_rows($result);
$i=1;
while($row = mysql_fetch_array($result))
{
if($i < $rows){
echo $row['value'].",";
$i=$i+1;}
else
{
echo $row['value'];
$i=$i+1;
}
}
echo " &cht=lc";
echo " &chxt=x,y";
echo " alt='Sample chart'/></img>";
?>
</html>
The table contains values of type INT whc im trying to display through
the chart.I double checked the generated source of this page and it is
perfectly alright with no anomalies observable to me..I hope someone
could help me..Thanks.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Chart API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/google-chart-api?hl=en
-~----------~----~----~----~------~----~------~--~---