phpGraphEd

phpGraphEd is a graph drawing class for php.
Download

phpGraphEd Ranking & Summary

Advertisement

  • Rating:
  • License:
  • GPL
  • Price:
  • FREE
  • Publisher Name:
  • Edward
  • Publisher web site:
  • http://www.intressegruppen.info/?page=html-material-programvara-phpgraphed

phpGraphEd Tags


phpGraphEd Description

phpGraphEd is a graph drawing class for php. phpGraphEd is a graph drawing class for php. It has support for groups, transparent everything, borders, etc. The graphs it renders (in GD format) can be outputted for low resolution monitor viewing or high resolution printing. The project was written due to a need for a high resolution graph class at the office and released to the public domain under the GPL license to repay others for the software we ourselves have used free of charge.Requirements:· PHP 4+· Bundled GD· Some TTF fonts (not included for space reasons)Usage examples:Basic usage. require_once('phpGraphEd/phpGraphEd.php');$graphEd = new phpGraphEd();// Set graph options$graphEd->backgroundSetColor(200, 200, 200, 0); // Otherwise the background is transparent// Set graph data$graphEd->titleSet('Is PHPGraphEd impressive?');$graphEd->dataAdd('Yes', rand(0, 12));$graphEd->dataAdd('No', rand(0, 20));$graphEd->dataAdd('Undecided', rand(5, 10));// Render the graph$image = $graphEd->render();// Output it to the browserheader("Content-type: image/png");imagepng($image);Groups in the graph. require_once('phpGraphEd/phpGraphEd.php');$graphEd = new phpGraphEd();// Set graph options$graphEd->backgroundSetColor(200, 200, 200, 0); // Otherwise the background is transparent// Set graph data$graphEd->titleSet('Is PHPGraphEd impressive?');$graphEd->dataAdd('Yes', rand(0, 12), 'Men');$graphEd->dataAdd('No', rand(30, 35), 'Women');$graphEd->dataAdd('No', rand(0, 20), 'Men');$graphEd->dataAdd('Undecided', rand(1, 20), 'Children');$graphEd->dataAdd('Undecided', rand(5, 10), 'Men');// Render the graph$image = $graphEd->render();// Output it to the browserheader("Content-type: image/png");imagepng($image);Changing most settings. require_once('phpGraphEd/phpGraphEd.php');$graphEd = new phpGraphEd();$graphEd->fontBaseDirectory('/usr/share/fonts/ttf/'); // Include fonts from this directory instead. $graphEd->sizeSet(1000, 500); // Pixels. Standard size is 1024x768$graphEd->fontScaling(1.2); // Scale the fonts and border widths etc. Use higher values than 1.0 // to make printable graphs. For example: 3000x2000 and 2.0$graphEd->backgroundSetImage('../images/background-main.jpg'); // Should probably be a file that actually exists...$graphEd->backgroundSetType('tile'); // Tile the background image$graphEd->titleSet('Is PHPGraphEd impressive?');$graphEd->axisFormat('*VALUE*'); // Show the axis as values, not percentages.$graphEd->dataAdd('Yes', rand(0, 6), 'Men');$graphEd->dataAdd('Yes', rand(12, 20), 'Women');$graphEd->dataAdd('Yes', rand(6, 12), 'Children');$graphEd->dataAdd('No', rand(0, 20), 'Men');$graphEd->dataAdd('No', rand(20, 35), 'Women');$graphEd->dataAdd('Undecided', rand(5, 10), 'Men');$graphEd->dataAdd('Undecided', rand(0, 10), 'Women');$graphEd->dataAdd('Undecided', rand(1, 20), 'Children');// Render the graph$image = $graphEd->render();// Output it to the browserheader("Content-type: image/jpeg"); // Graphs with image backgrounds are smaller with jpgimagepng($image, null, 90);What's New in This Release:· legendFont, legendFontColor, XFont, XFontColor, YFont, YFontColor, titleFontShadowColor, and Bar label split automatically.


phpGraphEd Related Software