Download the PHP package ianw/quickchart without Composer

On this page you can find all versions of the php package ianw/quickchart. 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?
ianw/quickchart
Rate from 1 - 5
Rated 5.00 based on 1 reviews

Informations about the package quickchart

quickchart-php

Packagist VERSION

A PHP client for the quickchart.io chart image API.

Installation

Use the QuickChart.php library in this project, or install from packagist.

Usage

This library provides a QuickChart class. Import and instantiate it. Then set properties on it and specify a Chart.js config:

Use getUrl() on your QuickChart object to get the encoded URL that renders your chart:

If you have a long or complicated chart, use getShortUrl() to get a fixed-length URL using the quickchart.io web service (note that these URLs only persist for a short time unless you have a subscription):

The URLs will render an image of a chart:

Creating the chart object

The QuickChart class constructor accepts an array containing the following keys. All are optional and can be set after object creation:

config: array or string

The actual Chart.js chart configuration.

width: int

Width of the chart image in pixels. Defaults to 500

height: int

Height of the chart image in pixels. Defaults to 300

format: string

Format of the chart. Defaults to png.

backgroundColor: string

The background color of the chart. Any valid HTML color works. Defaults to #ffffff (white). Also takes rgb, rgba, and hsl values.

devicePixelRatio: float

The device pixel ratio of the chart. This will multiply the number of pixels by the value. This is usually used for retina displays. Defaults to 1.0.

version: string

The Chart.js version to use. See documentation for supported versions.

apiKey: string

Your QuickChart API key, if you have one.

Setting properties

Each option above has an associated function call that you can invoke on your QuickChart object:

Getting URLs

There are two ways to get a URL for your chart object.

getUrl: string

Returns a URL that will display the chart image when loaded.

getShortUrl: string

Uses the quickchart.io web service to create a fixed-length chart URL that displays the chart image. Returns a URL such as https://quickchart.io/chart/render/f-a1d3e804-dfea-442c-88b0-9801b9808401.

Note that short URLs expire after a few days for users of the free service. You can subscribe to keep them around longer.

Other outputs

toBinary: binary string

Returns a binary string representing the chart image

toFile($path: string)

Write the image to a file

For example:

More examples

Checkout the examples directory to see other usage.

Troubleshooting

PHP5 users: This package requires curl and json modules.

sslv3 handshake alert failure: You are using an outdated version of curl. Please upgrade curl on your machine.


All versions of quickchart with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
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 ianw/quickchart contains the following files

Loading the files please wait ....