Error: Could not fetch http://thedevnet.com/wp-content/plugins/gd-star-rating/css/gdsr.css.php?t=0&s=a10i10m20k20c05r05%23121620243046%23121620243240%23s1pchristmas%23s1pcrystal%23s1pdarkness%23s1poxygen%23s1goxygen_gif%23s1pplain%23s1ppumpkin%23s1psoft%23s1pstarrating%23s1pstarscape%23t1pclassical%23t1pstarrating%23t1gstarrating_gif&ver=1.7.2 for caching. You might need to exclude this file in WP Minify options. The Developer Network – PHP Charts

PHP Charts

The pChart class is probably one of the most advanced and simple to use PHP classes thus far. Outputs chart into a cached image file so takes the burden off the webserver. The zip download at the bottom of this page includes plenty of easy to understand examples on how to make this class work for you.

Generates The Following Charts:

  • Line Chart
  • Cubic Curve Chart
  • Plot Chart
  • Bar Chart
  • Filled Line Chart
  • Filled Cubic Curve Chart
  • Simple Pie Chart
  • Explodeable Pie Chart
  • 3D Pie Chart
  • Scatter Axis
  • Scatter Line Charts
  • Scatter Plot Charts

Preview:

pChart Example

Insert First (Initialize):

  1. <?
  2.  // pChart: PHP Chart Creation Class
  3.  // http://thedevnet.com/php/classes/php-charts/
  4.  
  5.  // Include Class Files      
  6.  include("pChart/pData.class");  
  7.  include("pChart/pChart.class");  
  8. ?>

Example:

  1. <?
  2.  // remember to already have the class included
  3.  // Example1 : A simple line chart
  4.  
  5.  // Dataset definition    
  6.  $DataSet = new pData;  
  7.  $DataSet->ImportFromCSV("Sample/bulkdata.csv",",",array(1,2,3),FALSE,0);  
  8.  $DataSet->AddAllSeries();  
  9.  $DataSet->SetAbsciseLabelSerie();  
  10.  $DataSet->SetSerieName("January","Serie1");  
  11.  $DataSet->SetSerieName("February","Serie2");  
  12.  $DataSet->SetSerieName("March","Serie3");  
  13.  $DataSet->SetYAxisName("Average age");
  14.  $DataSet->SetYAxisUnit("µs");
  15.  
  16.  // Initialise the graph  
  17.  $Test = new pChart(700,230);
  18.  $Test->setFontProperties("Fonts/tahoma.ttf",8);  
  19.  $Test->setGraphArea(70,30,680,200);  
  20.  $Test->drawFilledRoundedRectangle(7,7,693,223,5,240,240,240);  
  21.  $Test->drawRoundedRectangle(5,5,695,225,5,230,230,230);  
  22.  $Test->drawGraphArea(255,255,255,TRUE);
  23.  $Test->drawScale($DataSet->GetData(),$DataSet->GetDataDescription(),SCALE_NORMAL,150,150,150,TRUE,0,2);  
  24.  $Test->drawGrid(4,TRUE,230,230,230,50);
  25.  
  26.  // Draw the 0 line  
  27.  $Test->setFontProperties("Fonts/tahoma.ttf",6);  
  28.  $Test->drawTreshold(0,143,55,72,TRUE,TRUE);  
  29.  
  30.  // Draw the line graph
  31.  $Test->drawLineGraph($DataSet->GetData(),$DataSet->GetDataDescription());  
  32.  $Test->drawPlotGraph($DataSet->GetData(),$DataSet->GetDataDescription(),3,2,255,255,255);  
  33.  
  34.  // Finish the graph  
  35.  $Test->setFontProperties("Fonts/tahoma.ttf",8);  
  36.  $Test->drawLegend(75,35,$DataSet->GetDataDescription(),255,255,255);  
  37.  $Test->setFontProperties("Fonts/tahoma.ttf",10);  
  38.  $Test->drawTitle(60,22,"example 1",50,50,50,585);  
  39.  $Test->Render("example1.png");
  40. ?>
pChart
pChart_1.27d.zip
Version: 1.27d

340.0 KiB
17 Downloads
Details…

GD Star Rating
loading...

Originally posted 2009-10-18 19:12:43.

Popularity: 20%

Posted by natster   @   6 February 2010
Tags : , , ,

Related Posts

Like this post? Share it!

RSS Digg Twitter StumbleUpon Delicious Technorati Facebook

0 Comments

No comments yet. Be the first to leave a comment !
Leave a Comment

You must be logged in to post a comment.

Previous Post
« Send SMS by Email.
Next Post
Speed Limit Download of File »
Powered by Wordpress   |   Lunated designed by ZenVerse