Generates a simple HTML/CSS bar chart. Supports colored bars.
Compatible with DokuWiki
Similar to pchart
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: https://github.com/syntaxseed/avbarchart.
<barchart>1000|A:500,B:50,C:250,D:1000</barchart>
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.
Add a hex color code to individual bars like so:
<barchart>1000|A:500:#ff0000,B:50,C:250,D:1000</barchart>
// ********* 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.
Hi everyone, let me know what you think. ~Sherri
Simple and elegant plugin. Excellent work!. ~Dmitri