Examples using the Confluence Chart Plugin
Simple Pie Chart | Simple Bar Chart | Simple Line Chart | Simple Area Chart | Advanced 3D Bar Chart | Advanced Line Chart Using SQL Data | Advanced Line Chart Using Multiple Data Tables | Time Series (XY plot)
Simple Pie Chart
{chart}
|| || Democrat || Republican || Independent ||
|| Mascots | 40 | 40 | 20 |
{chart}
Simple Bar Chart
{chart:title=Temperatures in Brisbane|type=bar|width=400|height=350|legend=true}
|| || January || February || March || April ||
|| Max | 37.5 | 32.7 | 28.0 | 25.3 |
|| Min | 31.3 | 26.8 | 25.1 | 18.7 |
{chart}
Simple Line Chart
{chart:title=Temperatures in Brisbane|type=line|width=500|height=300|legend=true}
|| || January || February || March || April ||
|| Max | 37.5 | 32.7 | 28.0 | 25.3 |
|| Min | 31.3 | 26.8 | 25.1 | 18.7 |
{chart}
Simple Area Chart
{chart:type=area|dataDisplay=true|legend=true|width=500|height=500}
|| Satisfaction || 2002 || 2003 || 2004 ||
| Very satisfied | 20 | 23 | 34 |
| Satisfied | 40 | 34 | 23 |
| Disatisfied | 25 | 26 | 25 |
| Very disatisfied | 15 | 17 | 18 |
{chart}
Advanced 3D Bar Chart
{chart:type=bar|3D=true|title=Temperatures in Rochester \\
Minnesota|dataDisplay=true|width=1000|height=500|legend=true
|yLabel=Fahrenheit|dataOrientation=vertical}
|| Month || Max\\Temperature || Min\\Temperature || Average\\Temperature ||
| January | 25.5 | 6.3 | 15.9 |
| February | 32.4 | 12.8 | 22.6 |
| March | 44.6 | 24.5 | 34.6 |
| April | 59.7 | 37.1 | 48.4 |
| May | 72.5 | 48.7 | 60.6 |
| June | 81.3 | 57.9 | 69.6 |
| July | 85.2 | 62.8 | 74 |
| August | 82.5 | 60.7 | 71.6 |
| September | 73.7 | 51.7 | 62.7 |
| October | 61.1 | 40.1 | 50.6 |
| November | 43.6 | 27.4 | 35.5 |
| December | 29.9 | 13.6 | 21.8 |
{chart}
Advanced Line Chart Using SQL Data
{chart:title=Confluence Activity By \\
Month|type=line|dataDisplay=true|width=1100|height=400|legend=true|dataOrientation=vertical|ylabel=Count}
{sql:datasource=ConfluenceDS|output=wiki}
select substring(lastmoddate from 1 for 7) as Month,
count(distinct CONTENT.title) "Pages created", count(CONTENT.title)
"Updates made" from CONTENT GROUP BY substring(lastmoddate from 1 for 7)
{sql}
{chart}
| Using SQL data Requires that the SQL Plugin be installed and the datasource name matches a datasource in your server. |
If you have trouble with the above query sorting properly try (oracle datasource):
{chart:title=Confluence Activity By Month|type=line|dataDisplay=false|width=1100|height=400|legend=true|dataOrientation=vertical|ylabel=Count}
{sql:YourDataSource|output=wiki}
select TO_DATE(TO_CHAR(c.lastmoddate, 'Mon-YY'), 'Mon-YY')
, count(distinct c.title) as "New Pages"
, count(c.title) as "Edits"
from wiki.CONTENT c
GROUP BY TO_DATE(TO_CHAR(c.lastmoddate, 'Mon-YY'), 'Mon-YY')
ORDER BY TO_DATE(TO_CHAR(c.lastmoddate, 'Mon-YY'), 'Mon-YY')
{sql}
{chart}
Advanced Line Chart Using Multiple Data Tables
- Site Statistics has an example of this.
Time Series (XY plot)
- also showing axis and color customization
{chart:type=timeSeries|dateFormat=MM.yyyy|timePeriod=Month| dataOrientation=vertical|rangeAxisLowerBound=0|colors=blue,gray} || Month || Revenue || | 1.2005 | 31.8 | | 2.2005 | 41.8 | | 3.2005 | 51.3 | | 4.2005 | 33.8 | | 5.2005 | 27.6 | | 6.2005 | 49.8 | | 7.2005 | 51.8 | | 8.2005 | 77.3 | | 9.2005 | 73.8 | | 10.2005 | 97.6 | | 11.2005 | 101.2 | | 12.2005 | 113.7 | || Month || Expenses || | 1.2005 | 41.1 | | 2.2005 | 43.8 | | 3.2005 | 45.3 | | 4.2005 | 45.0 | | 5.2005 | 44.6 | | 6.2005 | 43.8 | | 7.2005 | 51.8 | | 8.2005 | 52.3 | | 9.2005 | 53.8 | | 10.2005 | 55.6 | | 11.2005 | 61.2 | | 12.2005 | 63.7 | {chart}
