Diff: Help/ChartPlugin

Differences between current version and predecessor to the previous major change of Help/ChartPlugin.

Other diffs: Previous Revision, Previous Author

Newer page: version 2 Last edited on 11 October 2021 18:09 by admin
Older page: version 1 Last edited on 4 September 2021 15:47 by admin Revert
@@ -7,9 +7,9 @@
 then you should see the examples. 
  
 == Usage == 
 {{{ 
-<<Chart width=200 height=200 type=line color=green data="5, 7, 11, 3, 15" >> 
+<<Chart width=200 height=200 legend="My legend" type=line color=green data="5, 7, 11, 3, 15" >> 
 }}} 
  
 == Arguments == 
  
@@ -25,8 +25,12 @@
 |- 
 | **height** 
 | Graph height in pixels 
 | 200 
+|-  
+| **legend**  
+| Legend of the chart  
+| //None//  
 |- 
 | **type** 
 | line, bar or pie 
 | line 
@@ -42,41 +46,47 @@
  
 {{{ 
 <<Chart type=line 
  data="5, 7, 11, 3, 15" 
+ legend="Price evolution"  
 >> 
 }}} 
  
 <<Chart type=line 
  data="5, 7, 11, 3, 15" 
+ legend="Price evolution"  
 >> 
  
 === Bar chart === 
  
 {{{ 
 <<Chart type=bar 
  color=red 
  data="5, 7, 11, 3, 15" 
+ legend="Number of users"  
 >> 
 }}} 
  
 <<Chart type=bar 
  color=red 
  data="5, 7, 11, 3, 15" 
+ legend="Number of users"  
 >> 
  
 === Pie chart === 
  
 {{{ 
 <<Chart type=pie 
  color=blue 
  data="5, 7, 11, 3, 15" 
+ legend="Use per country"  
 >> 
 }}} 
  
 <<Chart type=pie 
  color=blue 
  data="5, 7, 11, 3, 15" 
+ legend="Use per country"  
 >> 
  
 == Known Problems == 
  
@@ -86,9 +96,10 @@
 == Author == 
 * Marc-Etienne Vargenau 
  
 == See Also == 
+* [[Help:AsciiSVGPlugin]]  
  
 <noinclude> 
 ---- 
 [[PhpWikiDocumentation]] [[CategoryWikiPlugin]] 
 </noinclude> 

current version

The Chart plugin allows to easily draw simple graphs on a wiki page.

Three graph formats are possible: line, bar and pie. In pie mode, negative values are ignored.

The browser must support SVG in order graphs to be displayed. If you are using a recent browser (Firefox, Opera, Chrome, Safari) then you should see the examples.

Usage

<<Chart width=200 height=200 legend="My legend" type=line color=green data="5, 7, 11, 3, 15" >>

Arguments

Argument

Description

Default value

width

Graph width in pixels

200

height

Graph height in pixels

200

legend

Legend of the chart

None

type

line, bar or pie

line

data

Graph data: a list of numbers separated by comma

None (required argument)

Examples

Line chart

<<Chart type=line
        data="5, 7, 11, 3, 15"
        legend="Price evolution"
>>
Price evolution

Bar chart

<<Chart type=bar
        color=red
        data="5, 7, 11, 3, 15"
        legend="Number of users"
>>
Number of users

Pie chart

<<Chart type=pie
        color=blue
        data="5, 7, 11, 3, 15"
        legend="Use per country"
>>
Use per country

Known Problems

With multiple Chart plugins on the same page the 2nd and subsequent ones will have the same width and height.

Author

  • Marc-Etienne Vargenau

See Also