Allows to embed simple chart graphics using the Google Chart API
Compatible with DokuWiki
Similar to achart, c3chart, charter, googlechart, pchart
This plugin used to use the Google Image Chart API. This API has been deprecated for years and finally stopped working in 2024. The plugin now relies on the Open Source QuickChart.io service. Old charts should continue to work, but will probably look different.
Search and install the plugin using the Extension Manager. Refer to Plugins on how to install plugins manually.
Let's start with an example:
<gchart 350x120 pie3d #0000ff #ffffff right> Apples = 3 Peaches = 23 Strawberries = 25 Peanuts = 7 </gchart>
As you can see, the usage is simple. You give your data as name=value pairs inside the <gchart>
tags. In the start tag you can add various optional options:
widthxheight
in pixels. Defaults to 320x140
pie3d
, can be one of the followingpie3d
for a 3D pie graph1)pie2d
for a 2D pie graphline
for a line graphsparkline
for a “sparkline” graphhbar
for a horizontal bar graphvbar
for a vertical bar graphqr
for a two-dimensional barcodeleft
, center
or right
. Defaults to right
.value
is given, the entered values are added to the graph“this is my Title”
Hex colors can be the typical 3 part RGB hexcodes known from HTML or can contain a 4th alpha transparency value.
For QR-codes, the first line of data may contain a unique letter L
, M
, Q
or H
to indicate the error correction level. The default value is L
. The other lines are joined with a semi-colon (;) and encoded in the barcode:
<gchart qr 120x120> M URLTO:www.dokuwiki.org/plugin:gchart </gchart>
The default graph and background color can be set in the configuration manager to match the style of your template.
It is recommended to enable the fetchsize option to make use of image caching.