Access Keys:
Skip to content (Access Key - 0)

Adaptavist Documentation Move

This documentation is deprecated. Adaptavist's documentation has moved to a new location where it is maintained and updated. Please visit Adaptavist's new Documentation area.

chart macro

Overview:

The {chart} macro creates pie, line and bar charts quickly and easily...

This superb macro allows you to take tabular data and quickly turn it in to eye catching and easy to understand graphical charts on your pages.

Parameters:

The basic use of the macro is as follows:

{chart:title=t|type=pie|width=w|height=h|displayData=d|legend=l}
||      || table || containing || data || and || headings ||
||Value | 234 | 54 | 346 | 142 | 839 |
{chart}
Parameter Required Default Notes
title   An optional title to display at the top of the chart.
type pie The type of chart to display:
  • pie - a pie chart, good for showing ratios
  • line - a line chart, good for showing changes over time
  • bar - a bar chart, good for showing related data sets
  • area - an area chart (line chart with filled areas)
    There are also a number of "x/y" plots which have numerical X and Y axes. You can optionally make these time based (see timeSeries parameter).
  • xyArea - An "x/y" area chart
  • xyBar - An "x/y" bar chart
  • xyLine - An "x/y" line chart
  • xyStep - An "x/y" step chart
  • xyStepArea - An "x/y" step area chart
  • scatter - A scatter plot
  • timeSeries - A time series chart
dateFormat   A mask that defines the format of dates when using type=timeSeries charts (see Date Formats tab above).
timePeroid Day Specify the time period for the type=timeSeries charts:
  • Millisecond - 1/1000th of a second
  • Second - 1/60th of a minute
  • Minute - 1/60th of an hour
  • Hour - 1/24th of a day
  • Day - 1/7th of a week
  • Week - 7 days
  • Month - a calendar month
  • Quarter - 3 calendar months
  • Year - 12 calendar months
timeSeries false If set to true, the X values in an "x/y" plot will be treated as a time series and as such will be subject to the settings defined by the dateFormat and timePeriod parameters.
3D false If set to true then a pie, line or bar chart will be shown with 3D perspective.
orientation vertical By default the line, bar and area charts are shown vertically unless you set this parameter to horizontal.
stacked false If set to true then a bar or area chart will be shown as stacked.
width 300 The width of the chart in pixels.
height 300 The height of the chart in pixels.
dataDisplay false If set to true the table containing the raw data will be shown beneath the chart.
dataOrientation horizontal By default, the data table contains chart data in columns from left to right. If you set this parameter to vertical, however, the chart will take it's data in rows from top to bottom.
xlabel   The label to show on the x axis.
ylabel   The label to show on the y axis.
legend true By default a legend is shown for a chart, unless you set this parameter to false (reccommended for pie charts).
bgColor white The background colour of the chart panel. The colour can be specified by a hexidecimal colour code or a colour name: blue, cyan, gray, green, maroon, navy, purple, red, silver, teal, violet, white, yellow.
borderColor gray By default, the chart panel does not have a border. If you would like a border, specify it's color. The colour can be specified by a hexidecimal colour code or a colour name: blue, cyan, gray, green, maroon, navy, purple, red, silver, teal, violet, white, yellow.
opacity Dependant on cart type A number between 0 (transparent) and 100 (opaque) defining the transparency of areas, bars or lines in the chart. Defaults vary depending on the type of chart:
  • 75 for 3D charts
  • 50 for non-stacked area charts
  • 100 for all other charts

Note: The "dataDisplay" parameter used to be called "displayData" prior to version 1.2 of this plugin.

Examples:

Frequently Asked Questions:

Q Can I change the colours of the background, etc?
A No, not at present.

See Also:



View old comments


Adaptavist Theme Builder Powered by Atlassian Confluence