Download the PHP package fundevogel/kirby3-charts without Composer

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

kirby3-charts

Build

A Kirby v3 plugin for creating SVG charts - batteries included.

What

kirby3-charts is a Kirby v3 wrapper for SVGGraph, as such there are (almost) no limits to what kind of chart may be created.

How

Install this package with Composer:

Usage

In order to generate a chart, we need some data first. The page method toChart() accepts an array of data points as first argument - basically two or more arrays, each of which consists of color (string) and share (float):

There's also a field method toChart() suitable for structure fields. The included example blueprint fields/chart is a good starting point & looks basically like this:

Both methods take another two arrays for further customization:

Note: Both methods return a file object of the newly created SVG chart (unless inline is activated) for further use.

Configuration

You may also change certain fallback options from your config.php globally ('fundevogel.charts.optionName'):

Option Type Default Description
'type' string DonutGraph Default chart type to be created
'template' string chart Default file template
'width' int 100 SVG canvas width
'height' int 100 SVG canvas height
'precision' int 2 Rounding precision (-1 = off)
'inline' bool false Return SVG string insead of File

Example

Adding more items to the example $data from before and using above code, the generated chart looks like this:

Credits

This library is powered by SVGGraph, an extensive library for creating SVG charts, written by goat1000.

License

kirby3-charts is licensed under the buy a license.

Happy coding!


All versions of kirby3-charts with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4|^8.0
getkirby/composer-installer Version ^1.2.0
goat1000/svggraph Version ^3.14.0
kschu91/largest-remainder-method Version ^1.1.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 fundevogel/kirby3-charts contains the following files

Loading the files please wait ....