Questions answered by this recipe
This section is optional; use it to indicate the types of questions (if any) this recipe is intended to answer.
'This recipe allows for the creation of simple charts in PmWiki by inline specification of the data.'This recipe allows for the creation of simple charts in PmWiki by inline specification of the data.
- Download LibChart 1.1
- Unpack the libchart in the
- Download libchart.phpΔ and put it in the
- Make a libchart directory inside
- make sure the libchart directory is world writable (chmod 777 pub/libchart)
(:chart title='Your Chart' data='1,2,3,4' labels='1,2,3,4' width=400 height=300 type=(HorizontalChart|VerticalChart|PieChart):)
- Also supports (:chartdir:) instead of (:chart:) for compatibility with ChartDirector
- Width and Height are in pixels
- Only data and labels are required, the rest is optional
- type must be one of HorizontalChart,VerticalChart,PieChart (case sensitive probably) -- defaults to VerticalChart
- The charts are cached for an indefinite time -- delete the files in
pub/libchartif you want to regenerate them.
- 09/02/2006 - Initial version
Vertical bar chart
(:chartdir title='Network Activty Summary Packets' data=150,147,857,509,598,351,352,566,298,376,327,588,604 labels='Apr 01,Apr 08,Apr 15,Apr 22,Apr 29,May 06,May 13,May 20,May 27,Jun 03,Jun 10,Jun 17,Jun 24':)
(:chartdir title='Most visited pages for www.example.com' data=50,83,142 labels='/wiki/Instant_messenger, /wiki/Web_Browser, /wiki/World_Wide_Web' type=HorizontalChart width=600 height=400:)
(:chartdir title='User agents for www.example.com' data=80,75,50 labels='Mozilla Firefox, Konqueror, Other' type=PieChart width=600 height=400:)
See discussion at LibChart-Talk
User notes? : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.