jkkenzie Posted May 10, 2008 Share Posted May 10, 2008 There is this phpgraphlib for making graphs, any idea on how to change x axis values? here is my code $result = mysql_query("SELECT*FROM tblcalc WHERE projectname='$project' ORDER BY id"); while($row = mysql_fetch_assoc($result)) { $A[] = $row['Values_A']; $C[]= $row['Values_C']; $country[]= $row['country']; } mysql_close($con); $graph=new PHPGraphlib(950,560); $data=array("$C[0]"=>$A[0],$C[1]=>$A[1],$C[2]=>$A[2],$C[3]=>$A[3], $C[4]=>$A[4],$C[5]=>$A[5],$C[6]=>$A[6],$C[7]=>$A[7],$C[8]=>$A[8], $C[9]=>$A[9],$C[10]=>$A[10],$C[11]=>$A[11]); $data2=array($C[12]=>$A[12],$C[13]=>$A[13],$C[14]=>$A[14],$C[15]=>$A[15], $C[16]=>$rows2[16],$C[17]=>$A[17],$C[18]=>$A[18],$C[19]=>$A[19],$C[20]=>$A[20], $C[21]=>$A[21],$C[22]=>$A[22],$C[23]=>$A[23]); $data3=array($C[24]=>$A[24],$C[25]=>$A[25],$C[26]=>$A[26],$C[27]=>$A[27], $C[28]=>$A[28],$C[29]=>$A[29],$C[30]=>$A[30],$C[31]=>$A[31],$C[32]=>$A[32], $C[33]=>$A[33],$C[34]=>$A[34],$C[35]=>$A[35]); $data4=array($C[36]=>$A[36],$C[37]=>$A[37],$C[38]=>$A[38],$C[39]=>$A[39], $C[40]=>$A[40],$C[41]=>$A[41],$C[42]=>$rows4[42],$C[43]=>$A[43],$C[44]=>$A[44], $C[45]=>$A[45],$C[46]=>$A[46],$C[47]=>$A[47]); Thanks in advance.. Jose Link to comment https://forums.phpfreaks.com/topic/105048-phpgraphlib/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.