Cristiano - 2014-01-09

Build my code with data from mysql database, but when debugging the application generated error in the pChart class.
How do I fix this already googled and not found the solution.

Follow my code and the error page.

ERRO:

Fatal error: Unsupported operand types in E:\wamp\www\Projeto_entrega2.2\pChart\class\pDraw.class.php on line 1851

My code:

addPoints(array($timestamp),"Timestamp"); $myData->addPoints(array($temperature),"Temperature"); $myData->addPoints(array($humidity),"Humidity"); /* Criando o objeto pchart */ $myPicture = new pImage(700,230,$myData); /* Turn of Antialiasing */ $myPicture->Antialias = FALSE; /* add bordas */ $myPicture->drawRectangle(0,0,699,229,array("R"=>0,"G"=>0,"B"=>0)); /* escrevendo o titulo*/ $myPicture->setFontProperties( array( "FontName"=>"pChart/fonts/verdana.ttf" , "FontSize"=>18 ) ); $myPicture->drawText(150,35,"Average temperature",array("FontSize"=>20,"Align"=>TEXT_ALIGN_BOTTOMMIDDLE)); /* definindo tipo font */ $myPicture->setFontProperties(array("FontName"=>"../fonts/calibri.ttf","FontSize"=>6)); /* define o chart area */ $myPicture->setGraphArea(60,40,650,200); /* Draw the scale */ $scaleSettings = array("XMargin"=>10,"YMargin"=>10,"Floating"=>TRUE,"GridR"=>200,"GridG"=>200,"GridB"=>200,"DrawSubTicks"=>TRUE,"CycleBackground"=>TRUE); $myPicture->drawScale($scaleSettings); /* Turn on Antialiasing */ $myPicture->Antialias = TRUE; /* Draw the line chart */ $myPicture->drawLineChart(); /* Write the chart legend */ $myPicture->drawLegend(540,20,array("Style"=>LEGEND_NOBORDER,"Mode"=>LEGEND_HORIZONTAL)); /* gera a figura */ $myPicture->autoOutput("pictures/example.drawLineChart.simple.png"); ?>