It's better when it's simple

User Tools

Site Tools


AV Bar Chart Plugin

Compatible with DokuWiki

  • 2024-02-06 "Kaos" probably
  • 2023-04-04 "Jack Jackrum" probably
  • 2022-07-31 "Igor" probably
  • 2020-07-29 "Hogfather" yes

plugin Generates a simple HTML/CSS bar chart. Supports colored bars.

Last updated on

Similar to pchart

Tagged with chart, diagram, images, media


With this plugin you can create a quick and easy bar chart on your DokuWiki page. It uses CSS and HTML only and no images needed.

Screenshot and info available here:

Syntax and Usage

  • The first value is the max number that your data set will go to.
  • After the | you have a comma separated list of labels and values to be graphed.
  • In the source of the plugin are config vars that let you customize the size, color and font of your chart.

You can then use regular DokuWiki syntax to put a title above it and if needed, a legend below to describe the labels. If you make the bars wide, the labels can be full text.

Colored Bars

Add a hex color code to individual bars like so:



Configuration Vars:

// ********* CHART CONFIG SETTINGS *************

var $barWidth = 20;         //Pixel width of chart bars.
var $barColor = "#ccccff";  //Color of graph bars.
var $fontSize = "8pt;";     //Font size of labels and values.
var $maxPxHeight = "100";   //Maximum height of the chart in pixels.

// *********************************************

If your barWidth is not wider than the labels, your chart will look funny.



Please submit a PR to the GitHub repo.

Known Bugs

  • None.

To Do

  • Nicer style of bars.
  • Use divs instead of table.


  • 2007-10-19
    • Created plugin.
  • 2009-05-15
    • Added URL to zip for automatic installation.
  • 2013-02-25
    • Updated layout bugs for latest browsers and version of Dokuwiki.
    • Updated this wiki page to remove redundant comments.
  • 2020-02-07
    • Update for PHP v 7+.
    • Move to GitHub repo.
    • Add colored bars support. Contributed by ~ Gregor Anželj
  • 2022-08-08
    • Test on 2022-07-31 “Igor”.
    • Test and fix for PHP 8.1.

Comments / Discussion

Hi everyone, let me know what you think. ~Sherri

Simple and elegant plugin. Excellent work!. ~Dmitri

plugin/avbarchart.txt · Last modified: 2022-09-23 16:39 by johng

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki