View unanswered posts | View active topics It is currently Wed May 08, 2024 10:35 pm



Reply to topic  [ 2 posts ] 
$myPicture->stroke(); 
Author Message
New pChart user
New pChart user

Joined: Fri Feb 25, 2011 4:04 pm
Posts: 3
Post $myPicture->stroke();
I am trying to embed a graph into my portal. According to the pChart documentation, I should be able to use the stroke() function to render to browser.
Code:
$myPicture->stroke;

Then I am supposed to be able to invoke the script within an <img> tag.
Code:
<img src='mypic.php' />

Currently, the graph is working, but it is the only thing being displayed in the browser window. Could somebody please tell me what I am doing incorrectly. Help would be greatly appreciated. Here is summarized view of my code.
----------------------------------------------------------------------------------------------------------------------
netsales.php
Code:
<?php
include("../class/pData.class.php");
include("../class/pDraw.class.php");
include("../class/pImage.class.php");

/* query sales, create pData, create new pImage */

$myPicture->stroke();
?>

----------------------------------------------------------------------------------------------------------------------
index.php
Code:
<?php include ('netsales.php'); ?>
<html>
<body>
     <div id="wrapper">
          <div id="content"><img src="netsales.php" /></div>
     </div>
</body>
</html>


Fri Feb 25, 2011 4:17 pm
Profile
Site Admin
Site Admin
User avatar

Joined: Thu Dec 02, 2010 2:31 pm
Posts: 409
Location: France
Post Re: $myPicture->stroke();
Hi,

In the index.php file just remove the fist line :
Code:
<?php include ('netsales.php'); ?>

The <IMG tag will do the picture inclusion ;o)

Kind regards,
JD.


Fri Feb 25, 2011 8:27 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 12 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

Search for:
Jump to:  
cron