Hi Asgallant,
Thank you for taking some time to reply to my post.
I tried replacing my 'while loop' by yours but it doesn't work (on any
browser).
I'm not sure I was supposed to copy/paste your code without any
modification on my part though.
Here is my new 'graphvol()' function :
function graphvol($dtms) {
ctd("sej_suprep");
$sqlvolx = 'SELECT * FROM sej_volume WHERE date LIKE "%-'.$dtms.'-%"
ORDER BY date DESC';
$sqlvolcrnt = 'SELECT * FROM sej_volume ORDER BY DATE DESC LIMIT 0,
7';
if (empty($dtms)) {$sql = $sqlvolcrnt;} else {$sql = $sqlvolx;};
$result = mysql_query($sql) or die('Erreur SQL !'.
$sql.mysql_error());
$nb_champs = mysql_num_fields($result);
$output = array();
while($data = mysql_fetch_array($result)) {
$output[] = '[\''.eregi_replace('([0-9].*)-([0-9].*)-([0-9].*)','\
\3-\\2',$data[0]).'\', '.$data[1].']';
}
mysql_close();
}
Here is the source code from firefox :
google.load("visualization", "1", {packages:["corechart"]});
google.setOnLoadCallback(drawChart);
function drawChart() {
var data = new google.visualization.DataTable();
data.addColumn('string', 'Date');
data.addColumn('number', 'Volume');
data.addRows([
]);
var options = {
width: 500, height: 240,
title: ''
};
var chart = new
google.visualization.LineChart(document.getElementById('chart_div'));
chart.draw(data, {curveType: "none",
width: 900,
height: 300,
vAxis: {maxValue: 10},
legend: {position: 'none'},
hAxis: {direction : -1,slantedTextAngle: 90}
});
}
The 'graphvol()' doesn't get any data.
Any ideas ?
I'm sorry, I'm not an expert in php.
Thank you,
Best regards,
--
You received this message because you are subscribed to the Google Groups
"Google Visualization 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-visualization-api?hl=en.