2017 © Pedro Peláez
 

project c-pchart

Port of "pChart" library into PHP 5+

image

szymach/c-pchart

Port of "pChart" library into PHP 5+

  • Friday, July 13, 2018
  • by szymach
  • Repository
  • 6 Watchers
  • 72 Stars
  • 247,634 Installations
  • PHP
  • 5 Dependents
  • 0 Suggesters
  • 34 Forks
  • 4 Open issues
  • 31 Versions
  • 9 % Grown

The README.md

Support:

This project is supported in a basic manner and no new features will be introduced. Issues and pull requests will be reviewed and resolved if need be, so feel free to post them., (*1)

Build status:

  • Build Status main
  • Build Status 3.0
  • Build Status 2.0

About:

This library is a port of the excellent pChart statistics library created by Jean-Damien Pogolotti, and aims to allow the usage of it in modern applications. This was done through applying PSR standards to code, introducing namespaces and typehints, along with some basic annotations to methods., (*2)

This is the 3.x version, which removes the factory service and reorganizes the file structure a bit. It does not introduce any new features, but the changes are not compatibile with the 2.x branch. BC compatibility with the original library is mostly retained, however you can still use the 1.x version if you cannot risk any of these., (*3)

What was done:, (*4)

  • Support for PHP versions from 5.4 to 8.1., (*5)

  • Made a full port of the library's functionality. I have touched very little of the actual logic, so most code from the original library should work., (*6)

  • Defined and added namespaces to all classes., (*7)

  • Replaced all exit() / die() commands with throw statements., (*8)

  • Refactored the code to meet PSR-2 standard and added annotations (as best as I could figure them out) to methods Also, typehinting was added to methods where possible, so some backwards compatibility breaks may occur if you did some weird things., (*9)

  • Moved all constants to a single file. It is loaded automatically through Composer, so no need for manual action., (*10)

License:

It was previously stated that this package uses the MIT license, which did not meet the requirements set by the original author. It is now under the GNU GPL v3 license, so if you wish to use it in a commercial project, you need to pay an appropriate fee., (*11)

Contributing:

All in all, this is a legacy library ported over from PHP 4, so the code is neither beautiful nor easy to understand. I did my best to modernize and cover it with some basic tests, but there is much more that could be done. If you are willing and have time to fix or improve anything, feel free to post a PR or issue., (*12)

Installation (via Composer):

For composer installation, add:, (*13)

"require": {
    "szymach/c-pchart": "^3.0"
},

to your composer.json file and update your dependencies. Or you can run:, (*14)

$ composer require szymach/c-pchart

in your project's root directory., (*15)

Usage:

Your best source to understanding how to use the library is still the official wiki. However, I have ported at least one example for each chart into Markdown files, so you can compare each version and figure out how to use the current implementation., (*16)

Charts created through Image class

Most of the basic charts are created through methods of the CpChart\Image class. Below you can find a full list of these charts, alongside example code., (*17)

Standalone charts:

The more advanced charts have their own separate class you need to use in order to create them. As before, below is a full list of these, with example code., (*18)

Barcodes

The pChart library also provides a way to render barcodes 39 and 128. Below you can find links to doc on creating them:, (*19)

Cache

If you find yourself creating charts out of a set of data more than once, you may consider using the cache component of the library. Head on to the dedicated part of the documentation for information on how to do that., (*20)

Fonts and palletes

If you want to use any of the fonts or palletes files, provide only the name of the actual file, do not add the fonts or palettes folder to the string given into the function. If you want to load them from a different directory than the default, you need to add the full path to the file (ex. __DIR__.'/folder/to/my/palletes)., (*21)

References

The original pChart website, (*22)

Links

GitHub, (*23)

Packagist, (*24)

The Versions

13/07 2018

dev-master

9999999-dev https://github.com/szymach/c-pchart

Port of "pChart" library into PHP 5+

  Sources   Download

GPL-3.0 GPL-3.0-only

The Requires

  • ext-gd *
  • php >=5.4

 

The Development Requires

statistics charts pchart c-pchart cpchart

13/07 2018

dev-deps

dev-deps https://github.com/szymach/c-pchart

Port of "pChart" library into PHP 5+

  Sources   Download

GPL-3.0-only

The Requires

  • php >=5.4
  • ext-gd *

 

The Development Requires

statistics charts pchart c-pchart cpchart

28/01 2018

2.0.x-dev

2.0.9999999.9999999-dev https://github.com/szymach/c-pchart

Port of "pChart" library into PHP 5

  Sources   Download

GPL-3.0 GPL-3.0-only

The Requires

  • php >=5.4
  • ext-gd *

 

The Development Requires

statistics charts pchart c-pchart cpchart

28/01 2018

v3.0.6

3.0.6.0 https://github.com/szymach/c-pchart

Port of "pChart" library into PHP 5

  Sources   Download

GPL-3.0

The Requires

  • php >=5.4
  • ext-gd *

 

The Development Requires

statistics charts pchart c-pchart cpchart

25/11 2017

v3.0.5

3.0.5.0 https://github.com/szymach/c-pchart

Port of "pChart" library into PHP 5

  Sources   Download

GPL-3.0

The Requires

  • php >=5.4
  • ext-gd *

 

The Development Requires

statistics charts pchart c-pchart cpchart

25/11 2017

dev-fix

dev-fix https://github.com/szymach/c-pchart

Port of "pChart" library into PHP 5

  Sources   Download

GPL-3.0

The Requires

  • php >=5.4
  • ext-gd *

 

The Development Requires

statistics charts pchart c-pchart cpchart

25/11 2017

v2.0.11

2.0.11.0 https://github.com/szymach/c-pchart

Port of "pChart" library into PHP 5

  Sources   Download

GPL-3.0

The Requires

  • php >=5.4
  • ext-gd *

 

The Development Requires

statistics charts pchart c-pchart cpchart

21/08 2017

v3.0.4

3.0.4.0 https://github.com/szymach/c-pchart

Port of "pChart" library into PHP 5

  Sources   Download

GPL-3.0

The Requires

  • php >=5.4
  • ext-gd *

 

The Development Requires

statistics charts pchart c-pchart cpchart

21/08 2017

v2.0.10

2.0.10.0 https://github.com/szymach/c-pchart

Port of "pChart" library into PHP 5

  Sources   Download

GPL-3.0

The Requires

  • php >=5.4
  • ext-gd *

 

The Development Requires

statistics charts pchart c-pchart cpchart

17/07 2017

v3.0.3

3.0.3.0 https://github.com/szymach/c-pchart

Port of "pChart" library into PHP 5

  Sources   Download

GPL-3.0

The Requires

  • php >=5.4
  • ext-gd *

 

The Development Requires

statistics charts pchart c-pchart cpchart

16/07 2017

v3.0.2

3.0.2.0 https://github.com/szymach/c-pchart

Port of "pChart" library into PHP 5

  Sources   Download

GPL-3.0

The Requires

  • php >=5.4
  • ext-gd *

 

The Development Requires

statistics charts pchart c-pchart cpchart

16/07 2017

v2.0.9

2.0.9.0 https://github.com/szymach/c-pchart

Port of "pChart" library into PHP 5

  Sources   Download

GPL-3.0

The Requires

  • php >=5.4
  • ext-gd *

 

The Development Requires

statistics charts pchart c-pchart cpchart

14/07 2017

v3.0.1

3.0.1.0 https://github.com/szymach/c-pchart

Port of "pChart" library into PHP 5

  Sources   Download

GPL-3.0

The Requires

  • php >=5.4
  • ext-gd *

 

The Development Requires

statistics charts pchart c-pchart cpchart

01/07 2017

v3.0.0

3.0.0.0 https://github.com/szymach/c-pchart

Port of "pChart" library into PHP 5

  Sources   Download

GPL-3.0

The Requires

  • php >=5.4
  • ext-gd *

 

The Development Requires

statistics charts pchart c-pchart cpchart

01/07 2017

2.0.0

2.0.0.0 https://github.com/szymach/c-pchart

Port of "pChart" library into PHP 5

  Sources   Download

GPL-3.0

The Requires

  • ext-gd *
  • php >=5.4

 

The Development Requires

statistics charts pchart c-pchart cpchart

01/07 2017

2.0.8

2.0.8.0 https://github.com/szymach/c-pchart

Port of "pChart" library into PHP 5

  Sources   Download

GPL-3.0

The Requires

  • php >=5.4
  • ext-gd *

 

The Development Requires

statistics charts pchart c-pchart cpchart

12/06 2017
03/06 2017
20/03 2017
09/03 2017
08/03 2017
24/12 2015
24/12 2015
16/10 2015

dev-legacy

dev-legacy https://github.com/szymach/c-pchart

Port of "pChart" library into PHP 5.3.

  Sources   Download

MIT

The Requires

  • php >=5.3.3
  • ext-gd *

 

statistics composer charts pchart c-pchart

16/10 2015

1.1.6

1.1.6.0 https://github.com/szymach/c-pchart

Port of "pChart" library into PHP 5.3.

  Sources   Download

MIT

The Requires

  • php >=5.3.3
  • ext-gd *

 

statistics composer charts pchart c-pchart

28/01 2015

1.1.5

1.1.5.0 https://github.com/szymach/c-pchart

Port of "pChart" library into PHP 5.3.

  Sources   Download

MIT

The Requires

  • php >=5.3.3
  • ext-gd *

 

statistics composer charts pchart c-pchart

26/10 2014

1.1.3

1.1.3.0 https://github.com/szymach/c-pchart

Port of "pChart" library into PHP5 standards with composer.phar support.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

statistics composer charts pchart c-pchart

30/07 2014

1.1.2

1.1.2.0 https://github.com/szymach/c-pchart

Port of "pChart" library into PHP5 standards with composer.phar support.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

statistics composer charts pchart c-pchart

12/06 2014

1.1.1

1.1.1.0 https://github.com/szymach/c-pchart

Port of "pChart" library into PHP5 standards with composer.phar support.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

statistics composer charts pchart c-pchart