Download the PHP package comecc/c-pchart without Composer

On this page you can find all versions of the php package comecc/c-pchart. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package c-pchart

Table of contents:

About:

A project bringing Composer support and some basic PHP 5 standards to pChart 2.0 library. The aim is to allow pChart integration into modern frameworks like Symfony2.

This is the 2.0 version, which aims to further update the code, but without changing the functionality if possible. It will introduce some minor backwards compatibility breaks, so if that's a concern, use the 1.* version.

What was done:

License:

It was previously stated that this package is on 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.

Contributing:

If you wish to contribute to the 1.* version, there is a branch called legacy to which you may submit pull requests. Otherwise feel free to use the master branch.

Installation (via Composer):

For composer installation, add:

to your composer.json file and update your dependencies. Or you can run:

in your project directory, where the composer.json file is.

After that, all classes are available under CpChart\Chart namespace or CpChart\Factory for the factory.

Usage:

Now you can autoload or use the classes via their namespaces. If you want to, you may utilize the provided factory class. Below are examples of how to use the library, the charts themselves are borrowed from the official documentation.

Draw a chart through Image class only

Not all charts need to be created through a seperate class (ex. bar or spline charts), some are created via the Image class (check the official documentation before drawing). An example for a spline chart below:

Draw a chart with a dedicated class:

Some charts require using a dedicated class, which you can create via the factory. Notice that you specify the type of chart, not the class name. An example for a pie chart below:

Notes:

Basically, all should work as defined in the pChart 2.0 documentation with added support for try/catch functionality. The factory class has methods to load all types of classes present in the pChart library.

IMPORTANT! 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).

Changelog

1.0 Stable version with basic functionality.

1.1 Added factory service.

1.1.1 Changed chart loading via factory a bit (see class annotations).

1.1.2 Updated service class with Exception handling regarding missing / wrong class name.

1.1.3 The file with classes' constants is now loaded via Composer (thanks to ThaDafinser).

1.1.4 Fixed code-breaking typ (thanks to subtronic).

1.1.5 Added an option to hide the X axis or only it's values (thanks to julien-gm).

1.1.6 Added support for closures in formatting scale (thanks to funkjedi)

2.0 Updated all classes to PSR-2 standard, added typehinting where possible, updated annotations in methods to be as accurate as possible. Added Behat testing and restructed the namespaces into more sensible structure.

References

The original pChart website

Composer

PHP Framework Interoperability Group at GitHub on PHP coding standards:

PSR-0

PSR-1

PSR-2

PSR-4

Links

GitHub

Packagist


All versions of c-pchart with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5
ext-gd Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package comecc/c-pchart contains the following files

Loading the files please wait ....