Home  >  Article  >  Backend Development  >  Introduction to Jpgraph class library ntgraph graph download pyqtgrap

Introduction to Jpgraph class library ntgraph graph download pyqtgrap

WBOY
WBOYOriginal
2016-07-29 08:49:051339browse

The Jpgraph class library is a class library for graphics and image drawing that can be applied to PHP 4.3.1 or above. This class library is completely written based on the GD2 function library. Jpgraph class library provides a variety of methods for creating various statistical charts, including coordinate charts, bar charts, pie charts, etc. Using the Jpgraph class library simplifies the writing of complex statistical graphs, greatly improves the development rate of developers, and is widely used in today's PHP projects.

Jpgraph installation

Before installing Jpgraph, you first need to download the compressed package of this class library, http://jpgraph.net/download/

If you have already downloaded the compressed package of Jpgraph, You can install it by following the steps below.

(1) Extract all files under the compressed package into a folder, for example: D:wampserverwww

(2) Open the PHP installation directory, edit the php.ini file and modify it. include_path parameter, add the folder name after it, such as include_path = ".;D:wampserverwwwjpgraph-3.5"

(3) Restart the Apache server to take effect

Note: Jpgraph requires GD library support. If the user wants the Jpgraph class library to be only valid for the current site, just copy all the files in the src folder under the Jpgraph compressed package to the directory where the website is located, and call the specified file in the src folder when using it. That’s it, these contents will be explained in detail in the following content.

Jpgraph configuration

Jpgraph provides a file jpg-config.inc.php specifically for configuring the Jpgraph class library. Before use, you can configure Jpgraph by modifying the configuration file.

Configuration jpg-config.inc.php file contains the following two items

(1) Configuration to support Chinese

The Chinese standard fonts supported by Jpgraph can be modified by CHINESE_ TTF_FONT setting to achieve, The code is as follows:

define('CHINESE_TTF_FONT','bkai00mp.ttf');

Note: The statement to configure the font in the new version is in the

jpgraph_ttf.inc.php file.

(2) Default image format configuration

Set the default generated image format according to the image format supported in the current PHP environment. The configuration of J

pgraph's default image format is achieved by modifying define('DEFAULT_GFORMAT','auto');. Auto means that Jpgraph will retrieve the image formats supported by the system in the order of PNG, GIF and JPEG.

The above is an introduction to the Jpgraph class library, including graph and jpg content. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn