Thinkphp3.2.2 integrate the Jpgraph plug-in

Source: Internet
Author: User
Provides various official and user-released code examples. For code reference, you are welcome to learn thinkphp 3.2.2 integrate the Jpgraph plug-in.
Thinkphp 3.2.2 integrates the Jpgraph plug-in.
1. Download a Jpgraph plug-in package from the Jpgraph website.
2. Copy the Jpgraph plug-in package to the Thinkphp/Library/Vendor/Jpgraph folder (the plug-in is usually put in the Thinkphp extension folder) // Drawing case
Public function draw3D (){
Vendor ('jpgraph. char ');
$ Chart = new \ Chart;

$ Title = '3d pie fig'; // title
$ Data = array (20, 27, 45, 75, 90, 10, 20, 40); // data
$ Size = 140; // size
$ Width = 800; // width
$ Height = 500; // height
$ Legend = array ('aaa', 'bbbbbb', 'cccccc', 'ddddd', 'eee', 'ffffff', 'gggggg', 'hhhh '); // description
// $ Chart-> create3dpie ($ title, $ data, $ size, $ height, $ width, $ legend );

$ Title = 'bar fig'; // title
$ Data = array (20, 27, 45, 75, 90, 10, 80,100); // data
$ Size = 140; // size
$ Width = 750; // width
$ Height = 350; // height
$ Legend = array ('aaa', 'bbbbbb', 'cccccc', 'ddddd', 'eee', 'ffffff', 'gggggg', 'hhhh '); // description
$ Chart-> createcolumnar ($ title, $ data, $ size, $ height, $ width, $ legend );

/* $ Title = 'bar fig'; // title
$ Data = array (20, 27, 45, 75, 90, 10, 80,100); // data
$ Size = 140; // size
$ Width = 750; // width
$ Height = 350; // height
$ Legend = array ('aaa', 'bbbbbb', 'cccccc', 'ddddd', 'eee', 'ffffff', 'gggggg', 'hhhh '); // description
$ Chart-> createmonthline ($ title, $ data, $ size, $ height, $ width, $ legend );*/

/* $ Title = 'bar fig'; // title
$ Data = array (20, 27, 45, 75, 90, 10, 80,100); // data
$ Size = 140; // size
$ Width = 750; // width
$ Height = 350; // height
$ Legend = array ('aaa', 'bbbbbb', 'cccccc', 'ddddd', 'eee', 'ffffff', 'gggggg', 'hhhh '); // description
$ Chart-> createring ($ title, $ data, $ size, $ height, $ width, $ legend );

$ Title = 'bar business fig'; // title
$ Subtitle = 'August 11 ';
$ Data = array (90,100, 80,100,300,500,100,); // data
$ Size = 140; // size
$ Width = 750; // width
$ Height = 350; // height
$ Legend = array ('zhang San 1', 'zhang San 2', 'zhang San 3', 'zhang San 4', 'zhang San 5', 'zhang San 6', 'zhang San 7 ', 'zhang San 8'); // description
$ Chart-> createhorizoncolumnar ($ title, $ subtitle, $ data, $ size, $ height, $ width, $ legend );
*/
}
For detailed integration methods, see http://www.jb100.net/html/content-28-163-1.html

AD: truly free, domain name + VM + enterprise mailbox = 0 RMB

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.