Jpgraph charts cannot be exported using the lead-out class

Source: Internet
Author: User
Jpgraph charts cannot be exported using the introduction class
This post was last edited by H9zhou on 2014-05-12 15:31:35

Jpgraph chart use problem, in the display diagram of PHP file Introduction class, you cannot output the chart, the chart becomes a fork, is jpgraph not supported?

Ask a question jpgraph this thing want to learn, actually use much?

 Require_once (' SqlHelper.class.php ');//This is the class I wrote, used to manipulate the database, but a mistake was introduced.
Require_once (' jpgraph/jpgraph.php ');
Require_once (' jpgraph/jpgraph_bar.php ');


$datay 1=array (12,12,15);
$datay 2=array (0,0,0);

Create the graph.
$graph = new Graph (350,250);
$graph->setscale (' Textlin ');
$graph->setmargincolor (' Silver ');


Setup Title
$str = "";
$id =$_request[' id '];
if ($id ==1) {
$STR = "Support for Bush's situation chart";
}else if ($id ==2) {
$STR = "Support Obama's situation chart";
}
$graph->title->set ($STR);
$graph->title->setfont (ff_simsun,fs_bold,14);
Create the first bar
$bplot = new Barplot ($datay 1);
$bplot->setfillgradient (' AntiqueWhite2 ', ' antiquewhite4:0.8 ', grad_vert);
$bplot->setcolor (' darkred ');

Create the second bar
$bplot 2 = new Barplot ($datay 2);
$bplot 2->setfillgradient (' olivedrab1 ', ' olivedrab4 ', grad_vert);
$bplot 2->setcolor (' Darkgreen ');

and join them in an accumulated bar
$accbplot = new Accbarplot (Array ($bplot, $bplot 2));
$graph->add ($accbplot);

$graph->stroke ();
?>

------Solution--------------------
Remove all relevant documents from the BOM header and
Related Article

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.