Download the PHP package halfpastfouram/phpchartjs without Composer

On this page you can find all versions of the php package halfpastfouram/phpchartjs. 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 phpchartjs

Stable

Latest Stable Version Total Downloads License composer.lock Build Status Code Climate Test Coverage Quality

Development

Latest Unstable Version Build Status

PHPChartJS

PHP OOP library for ChartJS

PHPChartJS acts as an interface between the ChartJS library and the server side code. Set up a chart in no time and have every aspect of the graph managable from your PHP code. This interface is set up to provide code completion in every scenario so you never have to guess or lookup what options are available for the chosen chart. The library is entirely object oriented.

This library is still in active development and aims to implement all options ChartJS has to offer. Check the Configuration milestone to view the progress of implementing all existing options.

Example use

`` The result generated by rendering the chart will look something like this:

`

Callbacks

You can provide javascript callbacks with ease:

``

Rendering

Rendering the chart creates some HTML and some JavaScript. The JavaScript contains a JSON object providing the necessary configuration for ChartJS. Every part of the configuration can be cast to an array or a JSON object.

Render isolated part of the configuration:

``

Or return an array containing the set configuration:

``

Pretty mode

If you're not a fan of the long lines of code that are being generated you can force the rendering to be done in pretty mode, see the following example.

``

Want to see more? Fork this project and take a look at the examples in the test folder to explore the different options.

Configuration options

Every option that is supported by ChartJS will be made available in this library.

Layers

ChartJS requires you to build a JSON object containing the configuration options you want to set for the current chart. These options are spread over multiple layers inside the configuration object. Accessing these layers with PHPChartJS is super easy.

Let's say we wanted to access the chart's getAnimation subtree within the options subtree: `` You can now adjust any of ChartJS's getAnimation settings by using the getters and setters provided in that particular class.

Collections

If ChartJS requires an array with certain items as subsets in a configuration option that array will be represented by a collection in PHPChartJS. The collection can always by accessed directly to add, remove and replace values.

In some cases a specific object with a predetermined list of options is required in a collection. In these cases methods will be provided to create a new instance of said object and adding it to the collection.

Datasets are stored in a collection:

``

But the actual data in a dataset is also stored inside a collection:

`` For more information about the collections visit the halfpastfouram/collection project.

Installation

Using composer

$ composer require halfpastfouram/phpchartjs

Development

This project uses composer, which should be installed on your system. Most Linux systems have composer available in their PHP packages. Alternatively you can download composer from getcomposer.org.

If you use the PhpStorm IDE then you can simply init composer through the IDE. However, full use requires the commandline. See PhpStorm help, search for composer.

To start development, do composer install from the project directory.

Remark Do not use composer update unless you changed the dependency requirements in composer.json. The difference is that composer install will use composer.lock read-only, while composer update will update your composer.lock file regardless of any change. As the composer.lock file is committed to the repo, other developers might conclude dependencies have changed, while they have not.


All versions of phpchartjs with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.0 || ^7.0
ext-dom Version *
ext-json Version *
laminas/laminas-json Version 3.1.2
halfpastfouram/collection Version 1.0.0
symfony/var-dumper Version ^3.4
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 halfpastfouram/phpchartjs contains the following files

Loading the files please wait ....