Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7833297
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T12:38:58+00:00 2026-06-02T12:38:58+00:00

I’m having an issue displaying the 3DPie example pChart in my php page, no

  • 0

I’m having an issue displaying the 3DPie example pChart in my php page, no matter what the output (Stroke(),autoOutput(),render()) it doesn’t render to the browser, but the examples work in the examples folder.

My question is: why won’t it render to browser? How do I fix it? (its not the includes, they worked for the basic syntax tutorial)

include("code libraries/pChart2.1.3/class/pDraw.class.php");
include("code libraries/pChart2.1.3/class/pImage.class.php");
include("code libraries/pChart2.1.3/class/pData.class.php");

 /* Create and populate the pData object */
 $MyData = new pData();   
 $MyData->addPoints(array(50,2,3,4,7,10,25,48,41,10),"ScoreA");  
 $MyData->setSerieDescription("ScoreA","Application A");

 /* Define the absissa serie */
 $MyData->addPoints(array("A0","B1","C2","D3","E4","F5","G6","H7","I8","J9"),"Labels");
 $MyData->setAbscissa("Labels");

 /* Create the pChart object */
 $myPicture = new pImage(300,260,$MyData);

 /* Draw a solid background */
 $Settings = array("R"=>170, "G"=>183, "B"=>87, "Dash"=>1, "DashR"=>190, "DashG"=>203, "DashB"=>107);
 $myPicture->drawFilledRectangle(0,0,300,300,$Settings);

 /* Overlay with a gradient */
 $Settings = array("StartR"=>219, "StartG"=>231, "StartB"=>139, "EndR"=>1, "EndG"=>138, "EndB"=>68, "Alpha"=>50);
 $myPicture->drawGradientArea(0,0,300,260,DIRECTION_VERTICAL,$Settings);
 $myPicture->drawGradientArea(0,0,300,20,DIRECTION_VERTICAL,array("StartR"=>0,"StartG"=>0,"StartB"=>0,"EndR"=>50,"EndG"=>50,"EndB"=>50,"Alpha"=>100));

 /* Add a border to the picture */
 $myPicture->drawRectangle(0,0,299,259,array("R"=>0,"G"=>0,"B"=>0));

 /* Write the picture title */ 
 $myPicture->setFontProperties(array("FontName"=>"code libraries/pChart2.1.3/fonts/Silkscreen.ttf","FontSize"=>6));
 $myPicture->drawText(10,13,"pPie - Draw 2D pie charts",array("R"=>255,"G"=>255,"B"=>255));

 /* Set the default font properties */ 
 $myPicture->setFontProperties(array("FontName"=>"code libraries/pChart2.1.3/fonts/Forgotte.ttf","FontSize"=>10,"R"=>80,"G"=>80,"B"=>80));

 /* Create the pPie object */ 
 $PieChart = new pPie($myPicture,$MyData);

 /* Draw an AA pie chart */ 
 $PieChart->draw3DPie(160,140,array("Radius"=>70,"DrawLabels"=>TRUE,"LabelStacked"=>TRUE,"Border"=>TRUE));

 /* Write the legend box */ 
 $myPicture->setShadow(FALSE);
 $PieChart->drawPieLegend(15,40,array("Alpha"=>20));

 /* Render the picture (choose the best way) */
 $myPicture->autoOutput("vgraph.png");
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T12:39:01+00:00Added an answer on June 2, 2026 at 12:39 pm

    Possible Errors

    A. You did not include pPie.class.php in your script

    B. Possible wrong path

    C. Possible Wrong Font location

    Try

    require("lib/pchart/class/pData.class.php");
    require("lib/pchart/class/pDraw.class.php");
    require("lib/pchart/class/pImage.class.php");
    require("lib/pchart/class/pPie.class.php");
    
    
    $font1 = "lib/pchart/fonts/pf_arma_five.ttf" ;
    $font2 = "lib/pchart/fonts/pf_arma_five.ttf" ;
    
     $MyData = new pData();   
     $MyData->addPoints(array(50,2,3,4,7,10,25,48,41,10),"ScoreA");  
     $MyData->setSerieDescription("ScoreA","Application A");
    
     /* Define the absissa serie */
     $MyData->addPoints(array("A0","B1","C2","D3","E4","F5","G6","H7","I8","J9"),"Labels");
     $MyData->setAbscissa("Labels");
    
     /* Create the pChart object */
     $myPicture = new pImage(300,260,$MyData);
    
     /* Draw a solid background */
     $Settings = array("R"=>170, "G"=>183, "B"=>87, "Dash"=>1, "DashR"=>190, "DashG"=>203, "DashB"=>107);
     $myPicture->drawFilledRectangle(0,0,300,300,$Settings);
    
     /* Overlay with a gradient */
     $Settings = array("StartR"=>219, "StartG"=>231, "StartB"=>139, "EndR"=>1, "EndG"=>138, "EndB"=>68, "Alpha"=>50);
     $myPicture->drawGradientArea(0,0,300,260,DIRECTION_VERTICAL,$Settings);
     $myPicture->drawGradientArea(0,0,300,20,DIRECTION_VERTICAL,array("StartR"=>0,"StartG"=>0,"StartB"=>0,"EndR"=>50,"EndG"=>50,"EndB"=>50,"Alpha"=>100));
    
     /* Add a border to the picture */
     $myPicture->drawRectangle(0,0,299,259,array("R"=>0,"G"=>0,"B"=>0));
    
     /* Write the picture title */ 
     $myPicture->setFontProperties(array("FontName"=>$font1,"FontSize"=>6));
     $myPicture->drawText(10,13,"pPie - Draw 2D pie charts",array("R"=>255,"G"=>255,"B"=>255));
    
     /* Set the default font properties */ 
     $myPicture->setFontProperties(array("FontName"=>$font2,"FontSize"=>10,"R"=>80,"G"=>80,"B"=>80));
    
     /* Create the pPie object */ 
     $PieChart = new pPie($myPicture,$MyData);
    
     /* Draw an AA pie chart */ 
     $PieChart->draw3DPie(160,140,array("Radius"=>70,"DrawLabels"=>TRUE,"LabelStacked"=>TRUE,"Border"=>TRUE));
    
     /* Write the legend box */ 
     $myPicture->setShadow(FALSE);
     $PieChart->drawPieLegend(15,40,array("Alpha"=>20));
    
     /* Render the picture (choose the best way) */
     $myPicture->autoOutput("vgraph.png");
    

    Result

    Final Output

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
I would like to count the length of a string with PHP. The string
Basically, what I'm trying to create is a page of div tags, each has
this is what i have right now Drawing an RSS feed into the php,
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I am trying to render a haml file in a javascript response like so:
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.