|
|
Page 1 of 1
|
[ 5 posts ] |
|
Please i think im near to find this but...
Author |
Message |
juanfer
New pChart user
Joined: Fri Apr 01, 2011 12:32 am Posts: 2
|
Please i think im near to find this but...
Hi, i´m a Colombian girl, i have data from mysql and i want to try pchar 3d pie. i have line 14 error, what im doing worng? Code: <?php /* Example10 : A 3D exploded pie graph */ $db = mysql_connect("localhost", "root", "1Master10"); if ( $db == "" ) { echo " Error de conexión\r\n"; exit(); } mysql_select_db("f1db",$db);
$Requete = "SELECT `id1`,`id2`,`id3`,`id4`,`id5`,`vueltarapida` FROM `grabaresultados` ORDER BY `id1`"; $result = mysql_query($Requete,$db); while ($row = mysql_fetch_array($result)) { $DataSet->AddPoint($row["id1"],"Serie1"); $DataSet->AddPoint($row["id2"],"Serie2"); $DataSet->AddPoint($row["id3"],"Serie3"); $DataSet->AddPoint($row["id4"],"Serie4"); $DataSet->AddPoint($row["id5"],"Serie5"); $DataSet->AddPoint($row["vueltarapida"],"Serie6"); } $DataSet->AddAllSeries(); // Standard inclusions include("pChart/pChart/pData.class"); include("pChart/pChart/pChart.class"); // Initialise the graph $Test = new pChart(380,200); $Test->drawFilledRoundedRectangle(7,7,373,193,5,240,240,240); $Test->drawRoundedRectangle(5,5,375,195,5,230,230,230);
// Draw the pie chart $Test->setFontProperties("pChart/Fonts/tahoma.ttf",8); $Test->drawPieGraph($DataSet->GetData(),$DataSet->GetDataDescription(),150,90,110,TRUE,TRUE,50,20,5); $Test->drawPieLegend(310,15,$DataSet->GetData(),$DataSet->GetDataDescription(),250,250,250); $Test->Stroke("grafico.png"); ?>
|
Fri Apr 01, 2011 12:37 am |
|
|
jean-damien
Site Admin
Joined: Thu Dec 02, 2010 2:31 pm Posts: 409 Location: France
|
Re: Please i think im near to find this but...
Hi,
You have to start your script by the include statements :
include("pChart/pChart/pData.class.php"); include("pChart/pChart/pDraw.class.php"); include("pChart/pChart/pPie.class.php"); include("pChart/pChart/pImage.class.php");
Kind regards, JD.
|
Fri Apr 01, 2011 7:15 am |
|
|
juanfer
New pChart user
Joined: Fri Apr 01, 2011 12:32 am Posts: 2
|
Re: Please i think im near to find this but...
Hi jean thanks, i´ll try it. -----------edit---------- I´ve tryed but dont know why:
include("pChart/pChart/pData.class.php"); include("pChart/pChart/pDraw.class.php"); include("pChart/pChart/pPie.class.php"); include("pChart/pChart/pImage.class.php");
with the "pData.class.php" if in the doc files there´s not a file like that....only "pData.class".............now i have more errors than yesterday....
|
Fri Apr 01, 2011 2:39 pm |
|
|
mice32
Experienced pChart user
Joined: Thu Dec 02, 2010 3:03 pm Posts: 36 Location: Somerville, MA, USA
|
Re: Please i think im near to find this but...
juanfer wrote: with the "pData.class.php" if in the doc files there´s not a file like that....only "pData.class".............now i have more errors than yesterday.... Maybe you're using old documentation or an old pChart release. After 2.1.0 version, p*.class files were renamed to p.*.class.php. Look.
_________________
|
Fri Apr 01, 2011 10:39 pm |
|
|
jean-damien
Site Admin
Joined: Thu Dec 02, 2010 2:31 pm Posts: 409 Location: France
|
Re: Please i think im near to find this but...
Mice32 is right, you're probably using an old version of the library, I recommend you to upgrade to the latest 2.1.1 subversion.
JD.
|
Tue Apr 05, 2011 2:37 pm |
|
|
|
Page 1 of 1
|
[ 5 posts ] |
|
Who is online |
Users browsing this forum: Google [Bot] and 2 guests |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|
|