PHP Chart Class Jpgraph help us draw a dazzling chart _php tutorial

Source: Internet
Author: User
In

Prior to the use of PHP mapping must master the complex abstract drawing function, or with some Web-based download style chart, pie chart class to achieve. There is no unified chart class to implement the rapid development of charts.

Now we have a new option: PHP chart class jpgraph. A class library dedicated to charting. It makes the drawing a very simple thing, you just take the data from the database, define the title, the chart type, then the matter to the jpgraph, just grasp the few jpgraph built-in functions, you can draw a very dazzling chart!

PHP Diagram Class Jpgraph installation method:

1, first need to download the latest version of http://www.aditus.nu/jpgraph/.

2. Make sure that your PHP version is at least 4.04 (preferably 4.1.1) and supports the GD library. You must make sure that the GD library is functioning properly and can be judged by running Phpinfo () to see if the information for the GD library exists. Also need to have the GD library version should be 2.0, instead of 1.0.

3. Extract the downloaded Jpgraph compressed package to any folder.

4. Set jpgraph.php (Master profile for Jpgraph). Set the cache (cache) folder for Jpgraph, and the TTF (font) folder.

The Linux system changes to:

DEFINE ("Cache_dir", "/tmp/jpgraph_cache/");
DEFINE ("Ttf_dir", "/usr/x11r6/lib/x11/fonts/truetype/");

Windows system instead:

DEFINE ("Cache_dir", "c:/apache/htdocs/jpgraph_cache/");
DEFINE ("Ttf_dir", "c:/windows/fonts");

PHP Chart Class Jpgraph considerations:

(1) The cache folder path can be defined by itself, and the TTF (font) folder must be%system%/fonts.
(2) Make sure that PHP has write permissions to the cache folder.


http://www.bkjia.com/PHPjc/445997.html www.bkjia.com true http://www.bkjia.com/PHPjc/445997.html techarticle in the past, it was necessary to master the complex abstract drawing functions when drawing with PHP, or to use some of the styles of style and pie charts downloaded on the web. Without a unified chart class to implement ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.