Contents
Login Register Wishes Forum About
Getting Started » Examples
Help topics
Latest updates
4614d  replaceImageMapTitle
4614d  replaceImageMapValues
4614d  createFunctionSerie
4614d  setAbsicssaPosition
4614d  negateValues
Toolbox
  Download as PDF
  Print this page
  Share this page
  Create an account
  Feed the updates!
Google AdSense
Building the examples

The pChart binaries are shipped with some examples that will allow you to quickly create your first charts. All the examples are stored in the "examples" folder. You can use this example files to learn how pChart can be deeply customized for a better eye-looking integration in any web framework. There is at least three way to render the inbuild examples :

From a web server, going in the examples folder.
From a windows computer by double clicking on the buildAll.cmd batch file.
From the command line, using the PHP interpreter CLI interface.


Please note that the examples are using the autoOutput() function to either send the picture to your web browser if the script is invoked from a web browser or a flat file if called from the command line interface.

If you intend to re-use the example don‘t forget to adjust the class and fonts paths to your project / server configuration.


From a web server

You can render the examples directly using your web server. To do so, expend the pChart archive under your web server document root and navigate to the /examples/ folder. A simple web page should appears :



Just click on an example and it will be rendered. You‘ll also see the code that was used to generate the picture.


Using the BuildAll batch file

If you‘re running windows, assuming the PHP binaries are in the system PATH environment variable, you‘ll just have to run the buildAll.cmd batch file to quickly render all the examples in the /pictures sub folder.



If the /pictures folder is empty after running the script, you may review the log file named errors.log located in the /resources folder.


Linux operating system & manual scripts calls

If you‘re running linux or want to execute each samples one by one from the command line, just invoke the php interpreter this way :
 php -q examplename.php
You can find the scripts results in the /pictures folder.


Sandbox system

You may also want to play with the sandox system. See the description here.
Last updated on 01/07/2011 
by Jean-Damien 
Linked resources
Community comments
  No comments have been posted yet.
© Copyrights
Components used on this web site : Famfamfam icons has been made by Mark James, Rounded corners lite has been coded by Cameron Cooke and Tim Hutchison, SyntaxHighlighter has been written by Alex Gorbatchev. pChart and this web site have been created by Jean-Damien POGOLOTTI. This documentation contains 185 pages and 56 comments. 415 users have registered. This page has been rendered in 0,19 seconds. Wiki revision 1.37.