So I am new here, hopping the community can help me... I've spend last two days struggling to get this working.. Would love to incorporate these in my project... and if I can prove that it can work, my employer will purchase a server lic...
Thank you in advance for any hlp you may be able to provide. ...
my first problem is even though i see gd enabled in phpinfo, I when I do
if (!extension_loaded(‘gd‘) && !extension_loaded(‘gd2‘))
{
echo 'Extension not loaded';
}
the page shows Extension not loaded, can some one help me with this... I am using MMAP with php 5.3.6 on Macbook Air.
Here is the project .....
So here is what i am trying to do.. [ this is a basic example, I am sure if i can get this working, I can figure out the rest]
have a mySQL db..
table name - requests
column 1 - timestamp
column 2 - Value
table contains temp values for various parts of a machine and each part's name is stored in the name column. The timestamp is just when it was stored.
I would like to be able to pull data for each unique point, and show it in a line graph.
Here is what I have so far
Code:
$db = 'dbname';
$query = "SELECT * FROM Request";
$Result = mysql_query($query,$db);
while($row = mysql_fetch_array($Result)){
/* Get the data from the query result */
$timestamp = $row["Timestamp"];
$Value = $row["Value"];
}
/* Save the data in the pData array */
$myData->addPoints($timestamp,"Time");
$myData->addPoints($Value,"Value");
/* Put the timestamp column on the abscissa axis */
$myData->setAbscissa("Time");
/* Name this axis "Time" */
$myData->setXAxisName("Time");
/* Specify that this axis will display time values */
$myData->setXAxisDisplay(AXIS_FORMAT_TIME,"H:i");
/* First Y axis will be dedicated to the Value */
$myData->setAxisName(0,"Value");
$myData->setAxisUnit(-90,"");
$myPicture->autoOutput("pictures/example.drawLineChart.plots.png");