Hi all,
I am hoping someone here has used jpgraph before..If not, it is just a php based graphing setup. I am trying to get it to draw a line chart but for some reason I am only getting it to draw one point on the chart instead of all points. I am pulling numerical data from a mysql database and want to graph each point.
$tmpquery_user = "WHERE tablename.id = '" . $project . "' ";
$newsDetail2 = new request();
$newsDetail2->opentablename($tmpquery_user);
$comptnewsDetail2 = count($newsDetail2->tablename_id);
for ($i= 0;$i < $comptnewsDetail2;$i++) {
$datay = $newsDetail2->tablename_somenumbers[$i];
$p1 = new LinePlot($datay);
$p1->mark->SetType(MARK_FILLEDCIRCLE);
$p1->mark->SetFillColor("red");
$p1->mark->SetWidth(4);
$p1->SetColor("blue");
$p1->SetCenter();
$graph->Add($p1);
}
The mysql statement works fine outside of jpgraph so I would not think it is that. However, $datay seems to only pull the last item from the list or the graph program is only reading that item. Any ideas where this code may be messed up? Thanks!