423,311 Members | 1,224 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 423,311 IT Pros & Developers. It's quick & easy.

generating pie charts in php using the libcart package

P: 1
for the following code it gives anerror as "Fatal error: Class 'PieChart' not found in C:\xampp\htdocs\n1.php on line 5" even incuding the classes itshows anerror as" Warning: include(C:\xampp\htdocs\libchart\classes): failed to open stream: Permission denied in C:\xampp\htdocs\n1.php on line 3

Warning: include(): Failed opening 'libchart/classes' for inclusion (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\n1.php on line 3

Fatal error: Class 'PieChart' not found in C:\xampp\htdocs\n1.php on line 4",pls give the solution to fix errors.
Expand|Select|Wrap|Line Numbers
  1. <?php
  2. include "libchart/libchart.php";
  3.  
  4.     $chart = new PieChart(500, 250);
  5.  
  6.     $dataSet = new XYDataSet();
  7.     $dataSet->addPoint(new Point("Mozilla Firefox (80)", 80));
  8.     $dataSet->addPoint(new Point("Konqueror (75)", 75));
  9.     $dataSet->addPoint(new Point("Other (50)", 50));
  10.     $chart->setDataSet($dataSet);
  11.  
  12.     $chart->setTitle("User agents for www.example.com");
  13.     $chart->render("generated/demo3.png");
  14. ?>
Mar 1 '15 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.