pie chart

2D/3D Pie Chart for PHP

[ Pie Chart Home ] [ Set-Up ] [ Tutorials ] [ Documentation ] [ Buy Now ] [ Support ]

2D/3D Pie Chart for PHP

Tutorials - Data from other Scripts and Programs

Before following this tutorial it is essential that the graph software has been installed. If you have not yet done so then you should complete the install procedure now,
Quick Set-Up and Install »

This third tutorial demonstrates how to set the graph to dynamically pull the data from another PHP script. This method is not restricted to just PHP scripts, but can be used for any server side scripting program (eg. JSP, ASP, Java Sevlet Perl etc).

Step 1 - Add the <IMG> tag to your web page

Add this HTML code to your page
(replacing yourdomain.com with the actual domain of your web site and [URL FilePath] with the url of the web directory where your page resides),

<img src="http://www.yourdomain.com/jpowered/piechart/pie-chart.php?
data=[URL FilePath]/data.php&
config=[URL FilePath]/config.php"
width=500
height=500>

Save the web page and load it up to your web server.

 

Step 2 - Create the data and config files

From the /tutorials/ directory (of this package) copy the 2 files data.php and config.php to your web server.

These files should be placed in the same directory as your web page.

 

 

Notes:

The data.php script is a very simple little script which outputs the data for the graph. In a real implementation this script would be expanded to first acquire the data from another source ( series of files or database tables) and then output the calculated data.

This config.php script again is a simple script which outputs the configuration parameters upon request. For the function and options of each parameter see the following page:-

Graph Parameters »

Final Step - View the page in a browser

Open your web browser and view the page.

You should see two Pie Charts with 4 and 6 segments respectively.

 

 

Follow-Up Suggestion:

Extend the data.php script to connect to one of your own databases and construct data based upon the results of a query.

Now you have real-time graphing !

 

When to use this type of implementation.

If your data is a result of a calculation method (eg. averaging a broad range of data etc) or is from a database which is not a MySQL database, then using another server side process to act as the data interface provides enormous flexibility.

In the next tutorial we shall demonstrate how to set the graph to connect and pull data directly from a MySQL database in Real-Time.

next Tutorial »

 

 

« back to Getting Started next Tutorial »

Any Problems ?

In the vast majority of cases (over 95%) the above is all that is required. However if you experience any problems please feel free to tell us and we will be happy to assist.

Contact us here »

Please remember to include the URL of your web page.

[ Pie Chart Home ] [ Set-Up ] [ Tutorials ] [ Documentation ] [ Buy Now ] [ Support ]

How it Works »

How the graphing software works.

Quick Set-Up and Install »

step-by- step guide to add graphing for your site.

Tutorials »

Introducing many powerful features.

Licensing and Purchase Options »

Click the 'Buy & Download' button to review options.

buy and download pie chart graph for php

Documentation »

Full documentation

Help and Support »

If at any stage you require help or advice then please feel free to ask.

Contact us here »