By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,441 Members | 996 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,441 IT Pros & Developers. It's quick & easy.

How to solve the following error

P: 16
Hi,
I'm new to php, currently i'm trying to create a pie chart but i face this error.

This is the error msg : Fatal error: Class 'PieChart' not found in C:\wamp\www\Counter.php on line 10

This is the code -
Expand|Select|Wrap|Line Numbers
  1. <?php
  2. $chart = new PieChart(500, 250);
  3.  
  4.     $dataSet = new XYDataSet();
  5.     $dataSet->addPoint(new Point("A(80)", 80));
  6.     $dataSet->addPoint(new Point("B(75)", 75));
  7.     $dataSet->addPoint(new Point("C(50)", 50));
  8.     $chart->setDataSet($dataSet);
  9.  
  10.     $chart->setTitle("Hi");
  11.     $chart->render("D.png");
  12.     ?>
Oct 19 '11 #1

Share this Question
Share on Google+
5 Replies


100+
P: 1,059
include the path of the class file
Oct 19 '11 #2

P: 16
@johny10151981
so i just have to add include 'class.PieChart.php'; ?
Oct 19 '11 #3

100+
P: 1,059
If you dont include the specific file you surely cannot access the class in the file..
Oct 19 '11 #4

P: 16
@johny10151981
can use show me how? sry i'm totally new to it.
Oct 24 '11 #5

Post your reply

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