Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A powerfull Chart PHP-Drawer with broken examples
PHP
branch: master

This branch is 11 commits ahead of timmartin:master

Repaired Example 1-14

latest commit 52ad6a2612
sebix authored
Failed to load latest commit information.
Fonts initial commit of PHP 4 stuff
docs Added a phing rule for building documentation with phpdocumentor
examples
lib added PHPDoc to lib/PieChart.php
reports Addded a Phing build file (for continuous integration with hudson)
sample Before refactoring the examples
tests Using Unicolor in all Tests
.gitignore Repaired the pCache Class
README.markdown Added link to the API docs to the README
build.xml Added some more modules to be included in the PHPMD code size check

README.markdown

pChart PHP 5 Compatibility

pChart is a great charting library for PHP. However, it has not been updated in a long time and it's compatibility with PHP 5 will soon be lost because of new language features (namely constuctors can no longer be the class name as of PHP 5.3.3)

The v2 branch will not retain backward compatibility with the old API (though it will not be changed unnecessarily)

Goals

The goal of this project is:

  • Update pChart to use PHP 5 object-oriented language features
  • Fix bugs
  • Refactor as needed
  • Add proper docblocks to all functions (and there's a lot of them)
  • Rename some functions (it seems the original author's native language was not english)

Status

The main body of the code now has over 75% unit test coverage, and all the examples appear to be working. If you're starting a new project, it's probably reasonable to use this distribution in preference to the Sourceforge distribution, since any bugs in this distribution should hopefully be fixed on a reasonable timescale.

Code cleanup

The code has some questionable style issues, most noticeably inconsistent use of camel casing for method names. This isn't a particularly big deal in itself, since method names are case-insensitive, but we aim to clean it up as part of this project.

Documentation

There's API documentation which is built by the continuous integration server, so will track the latest changes on the master branch. We don't yet have separate documentation of the stable releases.

Branches

There are several branches of the code:

  • master is the current development trunk, which is a substantial rewrite in a more modern, Object-Oriented style. The API is still under heavy development and is not yet stable, though there should be a release branch of this before long.
  • v2 is the branch that originally housed the API rewrite when it was too unstable to be used, but is now probably obsolete
  • v1 retains full (or almost full) backward compatibility with the
    API of the original pChart, but has been updated for PHP 5 OO and cleaned up a little
  • gdline is an experimental optimisation based on the v1 branch that uses the native GD line drawing rather than drawing pixel-by-pixel. It is substantially faster (400% in some cases) but doesn't have antialiasing or drop-shadows working. Eventually I intend to incorporate these improvements in as optional speedups to the main branch, but for now if you need speed and don't care too much about prettiness, this is a viable option.

Continuous integration

There's now a hudson server here doing continuous integration.

Future development

I've been pondering switching to Cairo over GD as the rendering engine, since the support for antialiasing doesn't seem to be reliably present on PHP. This probably won't happen until after a release of the v2 API branch has gone out, at the very least.

Something went wrong with that request. Please try again.