Powerful Chart Generation with PHP

Simple. MIT Open-Source licensed. Generate SVG image charts in your backend, no javascript or browser needed. The main reason this library was built is to generate PDFs with charts in PHP only.

More and download on GitHub

The most basic line chart example with legends

This is a very basic example showing some line charts. You have many more options to use it.

Basic line charts with custom labels and step lines

Line charts with multiple lines sharing same yaxis

Also including a grid and smooth curved lines Each series has different x values so it starts and stops independently Also each series have different styles so each series can be styled for your needs Extra annotations on each of the axis are also added And on top, we a have a few special stylings attached, like gradients

Line charts with multiple lines each having it's own y-axis

Multi line charts, each line with it's own y-axis

Line charts with many data points and auto rotation/skip

This chart show how the x-axis auto fit itself so nothing overlaps

Annotations and Fonts

You can add several annotation types to x and y axis Also there are most websafe fonts built in You can use any font you want, but only the websafe ones correctly calculates text dimensions (required to properly place labels)

Basic column chart example

Very basic column charts. y-Baseline is set to -110, bellow all given values. So all columns grow upwards.

Stacked columns

Multiple values stacked in one column y-Baseline is set to zero (default), so values bellow zero go down Value labels are added as well as a summary label for each column

Mixed column and line charts

You can freely mix any line and column chart together

Column and line charts with grouped and stacked data combined

You can group and stack at the same time, as well as adding line charts on top

The most basic pie chart example