PHPackages                             fundevogel/kirby3-charts - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. fundevogel/kirby3-charts

ActiveKirby-plugin[Utility &amp; Helpers](/categories/utility)

fundevogel/kirby3-charts
========================

SVG charts for Kirby v3

1.0.1(4y ago)036MITPHPPHP ^7.4|^8.0

Since Feb 26Pushed 4y ago2 watchersCompare

[ Source](https://github.com/S1SYPHOS/kirby3-charts)[ Packagist](https://packagist.org/packages/fundevogel/kirby3-charts)[ Docs](https://codeberg.org/fundevogel/kirby3-charts)[ RSS](/packages/fundevogel-kirby3-charts/feed)WikiDiscussions main Synced yesterday

READMEChangelogDependencies (6)Versions (3)Used By (0)

kirby3-charts
=============

[](#kirby3-charts)

[![Build](https://camo.githubusercontent.com/3e0d1c08d41462bdb0d0266d4a13d927deca0641078eb91ac05c14783152f491/68747470733a2f2f63692e636f6465626572672e6f72672f6170692f6261646765732f46756e6465766f67656c2f6b69726279332d6368617274732f7374617475732e737667)](https://codeberg.org/Fundevogel/kirby3-charts/issues)

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

What
----

[](#what)

`kirby3-charts` is a Kirby v3 wrapper for [`SVGGraph`](https://github.com/goat1000/SVGGraph), as such there are (almost) no limits to what kind of chart may be created.

How
---

[](#how)

Install this package with [Composer](https://getcomposer.org):

```
composer require fundevogel/kirby3-charts

```

### Usage

[](#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):

```
$data = [
    ['title' => 'HTML', 'color' => '#4F5D95', 'share' => 0.6],
    ['title' => 'CSS', 'color' => '#2b7489', 'share' => 0.4],
];

$page->toChart($data);
```

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

```
type: structure
fields:
  title:
    label: Title
    type: text

  share:
    label: share
    type: number
    step: .01

  color:
    label: Color
    type: text
```

Both methods take another two arrays for further customization:

```
# SVG settings
$settings = [
    'width' => 100,
    'height' => 100,
    'type' => 'DonutGraph',
    'inline' => false,
];

# Options depend on the type of chart (in this example 'DonutGraph'),
# see https://www.goat1000.com/svggraph.php
$options = [
    'inner_radius' => 2,
    'stroke_width' => 0.5,
    'show_labels' => true,

    # .. etc
];

# Page method
$page->toChart($data, $settings, $options);

# Field method
$page->chartData()->toChart($settings, $options);
```

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

### Configuration

[](#configuration)

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

OptionTypeDefaultDescription`'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

[](#example)

```
# Create SVG chart as page file
$chart = $page->toChart($data, ['type' => 'DonutGraph'], [
    'donut_slice_gap' => 1.5,
    'inner_radius' => 0.7,
    'start_angle'  => -90,
    'stroke_width' => 0,
]);
```

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

[![Chart](example.svg)](example.svg)

Credits
-------

[](#credits)

This library is powered by `SVGGraph`, an extensive library for creating SVG charts, written by [goat1000](https://www.goat1000.com).

License
-------

[](#license)

`kirby3-charts` is licensed under the [MIT License](LICENSE), but **using Kirby in production** requires you to [buy a license](https://getkirby.com/buy).

**Happy coding!**

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~103 days

Total

2

Last Release

1485d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5933072731cd628e1ef2bdc59bc81da16dac859145a3be2dc5c83aab9095179b?d=identicon)[S1SYPHOS](/maintainers/S1SYPHOS)

---

Top Contributors

[![S1SYPHOS](https://avatars.githubusercontent.com/u/12161504?v=4)](https://github.com/S1SYPHOS "S1SYPHOS (6 commits)")

---

Tags

svgchartskirby3

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/fundevogel-kirby3-charts/health.svg)

```
[![Health](https://phpackages.com/badges/fundevogel-kirby3-charts/health.svg)](https://phpackages.com/packages/fundevogel-kirby3-charts)
```

###  Alternatives

[arnoson/kirby-vite

Vite helper for Kirby CMS

9765.1k3](/packages/arnoson-kirby-vite)[medienbaecker/kirby-modules

Easily add modules to your pages

895.5k1](/packages/medienbaecker-kirby-modules)[fabianmichael/kirby-meta

Your all-in-one powerhouse for any SEO and metadata needs imaginable.

7011.5k1](/packages/fabianmichael-kirby-meta)[afbora/kirby-minify-html

Enable minify HTML output for Kirby

4118.1k1](/packages/afbora-kirby-minify-html)[fundevogel/tiny-phpeanuts

A tiny PHP library for creating SVG donut (and pie) charts.

1315.5k1](/packages/fundevogel-tiny-phpeanuts)[bvdputte/kirby-autopublish

Kirby plugin to schedule the automatic publishing of pages on a certain date+time. It is built to work with enabled cache.

359.2k](/packages/bvdputte-kirby-autopublish)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
