generating pie charts in php using the libcart package

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • k prathapreddy
    New Member
    • Mar 2015
    • 1

    generating pie charts in php using the libcart package

    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:\xamp p\htdocs\libcha rt\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.
    Code:
    <?php
    include "libchart/libchart.php";
    
    	$chart = new PieChart(500, 250);
    
    	$dataSet = new XYDataSet();
    	$dataSet->addPoint(new Point("Mozilla Firefox (80)", 80));
    	$dataSet->addPoint(new Point("Konqueror (75)", 75));
    	$dataSet->addPoint(new Point("Other (50)", 50));
    	$chart->setDataSet($dataSet);
    
    	$chart->setTitle("User agents for www.example.com");
    	$chart->render("generated/demo3.png");
    ?>
    Last edited by Rabbit; Mar 2 '15, 04:42 AM. Reason: Please use [code] and [/code] tags when posting code or formatted data.
Working...