Documentation for Confluence 5.4.
Documentation for Confluence OnDemand and earlier versions of Confluence is available too.

Skip to end of metadata
Go to start of metadata

The Chart macro allows you to display a chart based on tabular data. When you add the macro to a page, you:

  • supply the data to be charted by the macro as a table in the placeholder of the macro.
  • edit the macro parameters in the Macro Browser to configure the format of the chart.

Screenshot 1: A table of data in the Chart macro placeholder


Screenshot 2: The resulting chart

 

Using the Chart Macro

To add the Chart macro to a page:

  1. Edit the page and use autocomplete to add the Chart macro. (Type '{chart}'.)
  2. Enter your chart data as one or more tables in the body of the macro placeholder. (See the screenshot above.)
  3. Click the macro placeholder and choose Edit.
  4. Select a chart type using the Type parameter (see below).
  5. Choose other parameter settings in the macro browser, as described below.
  6. Click Refresh in the 'Preview' area, to check that the chart appears as you expect.
  7. Click Save to add the chart to your page.
  8. Click Save again when you are ready to save the page.

Parameters

Chart Type Parameters

These parameters determine the type of chart to display and the way the chart looks.

ParameterDefaultDescription
Typepie

The type of chart to display. XY charts have numerical x- and y-axes. The x values may optionally be time-based (see the Time Series parameter).

Standard — pie, bar, line, area

XY Plots — xyArea, xyBar, xyLine, xyStep, xyStepArea, scatter, timeSeries

Other — gantt

Display Orientationvertical

Applies to area, bar and line charts.

    • vertical — y-axis is vertical
    • horizontal — x-axis is vertical
Show in 3Dfalse

Applies to area, bar and line charts.

Stacked ValuesfalseApplies to area and bar charts.
Show shapestrueApplies to line charts. Shapes are shown at each data point.
Opacity
  • 75 percent for 3D charts
  • 50 percent for non-stacked area charts
  • 100 percent for all other charts
A percentage value between 0 (transparent) and 100 (opaque) that determines how opaque the foreground areas and bars are.

Display Control Parameters

ParameterDefaultDescription
Width300The width of the chart in pixels.
Height300The height of the chart in pixels.
Display rendered datafalse

Sets whether to display the rendered body of the macro (usually the data tables). By default, the chart data table isn't rendered.

    • before — the data are displayed before the chart.
    • after — the data are displayed after the chart.
Image formatpng

The image format to be used for the chart.

    • png
    • jpg

Title and Label Parameters

ParameterDefaultDescription
Chart TitlenoneThe title of the chart.
Chart SubtitlenoneA subtitle for the chart, using a smaller font than for Title.
Horizontal-axis LabelnoneThe label for the x-axis (domain).
Vertical-axis LabelnoneThe label for the y-axis (range).
Show LegendtrueShow a legend or key.

Data Specification Parameters

The data for the chart is taken from tables found when the macro body is rendered. These options control how this data is interpreted. By default, numeric and date values are interpreted according to the Confluence global default language (locale) formats. If conversion fails, other languages defined in Confluence will be tried. Additional conversion options can be specified using the parameters below.

ParameterDefaultDescription
Tablesall first level tablesComma separated list of table ids and/or table numbers (starting at 1) contained within the body of the macro that will be used as the data for the chart. If data tables are embedded in other tables, then table selection will be required. This occurs when more complex formatting is done (for example using section and column macros).
Columnsall columnsComma separated list of column labels and/or column titles and/or column numbers for tables used for chart data. This applies to all tables processed. Columns are enumerated starting at 1. Column label is the text for the column in the header row. Column title is the (html) title attribute for the column in the header row.
Content Orientationhorizontal
    • vertical — data table columns will be interpreted as series.
    • horizontal — data tables rows will be interpreted as series.
Time Seriesfalse
    • true — the x values in an XY plot will be treated as time series data and so will be converted according to date formats.
Date formatConfluence language defined date formatsFor time series data, the date format allows for additional customization of the conversion of data to date values. If a Date format is specified, it will be the first format used to interpret date values. Specify a format that matches the time series data. See simple date format.
Time PeriodDayThe time period for time series data. Defines the granularity of how the data is interpreted. Valid values are: Millisecond, Second, Minute, Hour, Day, Week, Month, Quarter, Year.
LanguagenoneUse in combination with the Country parameter to form a locale. These additional number and date formats will be used for data conversion before the default languages.
Valid values are 2 character ISO 639-1 alpha-2 codes.
CountrynoneUse in combination with the Language parameter to form a locale. Valid values are 2 character ISO 3166 codes.
Forgivetrue
    • true — the macro tries to convert numeric and date values that do not totally match any of the default or user-specified formats.
    • false — enforce strict data format. Data format errors will cause the chart to not be produced.

Colour Parameters

Colours are specified using hexadecimal notation or HTML colour names.

ParameterDefaultDescription
Background ColourWhiteBackground of the chart.
Border Colourno borderBorder around the chart.
Colours Comma-separated list of colours used to customise category, sections, and series colours.

Axis Parameters

Depending on the chart type, the range and domain axis may be customised. These values are automatically generated based on the data but can be overridden by specifying one or more more of these parameters.

ParameterDefaultDescription
Range Minimum ValuenoneRange axis lower bound.
Range Maximum ValuenoneRange axis upper bound.
Range Axis Tick UnitnoneRange axis units between axis tick marks.
Range Axis Label AnglenoneAngle for the range axis label in degrees.
Domain Axis Lower BoundnoneOnly applies to XY plots. Domain axis lower bound. For a date axis, this value must be expressed in the date format specified by the Date format parameter.
Domain Axis Upper BoundnoneOnly applies to XY plots. Domain axis upper bound. For a date axis, this value must be expressed in the date format specified by the Date format parameter.
Domain Axis Tick UnitnoneOnly applies to XY plots. Domain axis units between axis tick marks. For a date axis, this value represents a count of the units specified in the Time Period parameter. The Time Period unit can be overridden by specifying a trailing character: y (years), M (months), d (days), h (hours), m (minutes), s (seconds), u (milliseconds).
Domain Axis Label Angle noneOnly applies to XY plots. The angle for the domain axis label, in degrees. 
Category Label Position none

Placement of the axis label text for categories.

    • up45 — 45 degrees going upward
    • up90 — 90 degrees going upward
    • down45 — 45 degrees going downward
    • down90 — 90 degrees going downward
Date Tick Mark Position start

Placement of the date tick mark.

    • start — tick mark is at the start of the date period.
    • middle — tick mark is in the middle of the date period.
    • end — tick mark is at the end of the date period.

Pie Chart Parameters

ParameterDefaultDescription
Pie Section LabelShow only the pie section key valueFormat for how pie section labels are displayed. The format uses a string with special replacement variables:
    • %0% is replaced by the pie section key.
    • %1% is replaced by the pie section numeric value.
    • %2% is replaced by the pie section percent value.

Example 1: "%0% = %1%" would display something like "Independent = 20"
Example 2: "%0% (%2%)" would display something like "Independent (20%)"

Pie Section ExplodeNo exploded sectionsComma separated list of pie keys that are to be shown exploded. Note: requires jFreeChart version 1.0.3 or higher.

Attachment Parameters

These are advanced options that can be used for chart versioning, to enable automation and to improve performance. Use these options carefully! Normally, the chart image is regenerated each time the page is displayed. These options allow for the generated image to be saved as an attachment and have subsequent access re-use the attachment. This can be useful especially when combined with the Cache Pluginto improve performance. Depending on the options chosen, chart images can be versioned for historical purposes.

ParameterDefaultDescription
AttachmentnoneThe name and location with which the chart image will be saved as an attachment. The user must be authorised to add attachments to the page specified.
    • ^attachmentName.png — the chart is saved as an attachment to the current page.
    • page^attachmentName.png — the chart is saved as an attachment to the page name provided.
    • space:page^attachmentName.png — the chart is saved as an attachment to the page name provided in the space indicated.
Attachment Versionnew

Defines the the versioning mechanism for saved charts.

    • new — creates new version of the attachment.
    • replace — replaces all previous versions of the chart. To replace an existing attachment, the user must be authorized to remove attachments for the page specified.
    • keep — only saves a new attachment if an existing export of the same name does not exist. An existing attachment will not be changed or updated.
Attachment Commentnone Comment used for a saved chart attachment.
Thumbnailfalse
    •  true — the chart image attachment will be shown as a thumbnail.

Examples

Pie Chart

Parameters in Macro Browser

Data Table in Macro Placeholder

Rendered Chart

Typepie

Fish Type

2011

Herring

9,500

Salmon

2,900

Tuna

1,500

Chart TitleFish Sold 2011
Show Legendtrue
Content Orientationvertical
  
  
  

 

 

 

 

Bar Chart

Parameters in Macro BrowserData Table in Macro PlaceholderRendered Chart
Typebar

Fish Type

2010

2011

Herring

9,500

8,300

Salmon

2,900

4,200

Tuna

1,500

1,500

Chart TitleFish Sold
Show Legendtrue

 

 
  
  
  
  

 

3D Bar Chart

Parameters in Macro BrowserData Table in Macro PlaceholderRendered Chart
Typebar

 

2009

2010

2011

Revenue

12.4

31.8

41.1

Expense

43.6

41.8

31.1

Show in 3Dtrue
Opacity50
Show Legendtrue
  
  
  
  

Time Series Chart

Parameters in Macro BrowserData Tables in Macro PlaceholderRendered Chart
TypeTime Series

Month

Revenue

1/2011

31.8

2/2011

41.8

3/2011

51.3

4/2011

33.8

5/2011

27.6

6/2011

49.8

7/2011

51.8

8/2011

77.3

9/2011

73.8

10/2011

97.6

11/2011

101.2

12/2011

113.7

Month

Expenses

1/2011

41.1

2/2011

43.8

3/2011

45.3

4/2011

45.0

5/2011

44.6

6/2011

43.8

7/2011

51.8

8/2011

52.3

9/2011

53.8

10/2011

55.6

11/2011

61.2

12/2011

63.7

Date FormatMM/yyyy
Time PeriodMonth
Content Orientationvertical
Range Axis Lower Bound0
Show Legendtrue
  
  
  
  
  

 

XY Line Chart

Parameters in Macro BrowserData Table in Macro PlaceholderRendered Chart
TypexyLine

 

12

14

23

Revenue

41.1

31.8

12.4

Expense

31.1

41.8

43.6

Show Legendtrue

 

 

 

 

XY Area Chart

Parameters in Macro BrowserData Table in Macro PlaceholderRendered Chart
TypexyArea
 

12

14

23

Revenue

41.1

31.8

12.4

Expense

31.1

41.8

43.6

Show Legendtrue
  
  
  
  
  

 

Area Charts

Example 1
Parameters in Macro BrowserData Table in Macro PlaceholderRendered Chart
Typearea

Satisfaction

2009

2010

2011

Very satisfied

20

23

34

Satisfied

40

34

23

Dissatisfied

25

26

25

Very dissatisfied

15

17

18

Show Legendtrue
Width300
Height300
Opacity50

 

 

 

 

Example 2
Parameters in Macro Browser Data Table in Macro PlaceholderRendered Chart
Typearea

Satisfaction

2009

2010

2011

Very satisfied

12

23

31

Satisfied

1

34

36

Dissatisfied

4

6

22

Very dissatisfied

2

7

12

 

 

Show Legendtrue
Width300
Height300
Stacked Valuestrue

 

 

 

Gantt Chart

Parameters in Macro BrowserData Table in Macro PlaceholderRendered Chart
Typegantt
PlanStartEndStatus
Stage 1
6/25/2013
7/10/2013
30%
Stage 2
7/13/2013
11/28/2013
40%
Stage 3
12/1/2013
12/25/2013
 
ActualStartEndStatus
Stage 1
6/25/2013
7/26/2013 
100%
Stage 2
7/29/2013
12/01/2013
40%
Stage 3
12/10/2013
12/25/2013
 
Width300
Height200
Columns,,1,2,3,4
Date formatMM/dd/yyyy

 

 

 

Code examples

The following examples are provided for advanced users who want to edit the underlying markup for a Confluence page. 

Macro name: chart

Macro body: Accepts rich text, consisting of tables that hold the chart's data.

This macro recognises a large number of parameters, listed here by type for convenience.

 See all parameters...

Chart type parameters

These parameters determine the type of chart to display and how the chart looks.

ParameterRequiredDefaultDescription
typeNopie

The type of chart to display. XY charts have numerical x- and y-axes. The x values may optionally be time-based. See the timeSeries parameter.

Available values:

  • Standard charts - pie, bar, line, area
  • XY plotsxyArea, xyBar, xyLine, xyStep, xyStepArea, scatter, timeSeries
  • Other chartsgantt
orientationNovertical

The display orientation. Applies to area, bar and line charts.

Available values:

  • vertical –  y-axis is vertical
  • horizontal –  x-axis is vertical
3DNofalse

Show in three dimensions. Applies to area, bar and line charts.

stackedNofalseStacked values. Applies to area and bar charts.
showShapesNotrueApplies to line charts. Shapes are shown at each data point.
opacityNo
  • 75 percent for 3D charts
  • 50 percent for non-stacked area charts
  • 100 percent for all other charts
A percentage value between 0 (transparent) and 100 (opaque) that determines how opaque the foreground areas and bars are.

Chart display parameters

ParameterRequiredDefaultDescription
widthNo300The width of the chart in pixels.
heightNo300The height of the chart in pixels.
dataDisplayNofalse

Determines whether to display the body of the macro, consisting of the data table. By default, the chart data table is not displayed.

Available values:

  • false – the data is not displayed.
  • true or after –  the data is displayed after the chart.
  • before – the data is displayed before the chart.
imageFormatNopng

The image format to be used for the chart.

Available values:

  • png
  • jpg

Chart title and label parameters

ParameterRequiredDefaultDescription
titleNo(None)The title of the chart.
subTitleNo(None)A subtitle for the chart.
xLabelNo(None)The label for the x-axis (domain).
yLabelNo(None)The label for the y-axis (range).
legendNofalseDetermines whether to show a legend (key) for the chart.

Chart data parameters

The data for the chart is taken from tables found in the macro body. The parameters below control how this data is interpreted. By default, numeric and date values are interpreted according to the Confluence global default language (locale) formats. If conversion fails, other languages defined in Confluence will be tried. You can specify additional conversion options using the parameters below.

ParameterRequiredDefaultDescription
tablesNoAll first level tablesYou can supply a comma-separated list of table IDs and/or table numbers (starting at 1) contained within the body of the macro that will be used as the data for the chart. If data tables are embedded in other tables, then table selection will be required. This occurs when more complex formatting is done (for example using section and column macros).
columnsNoAll columnsYou can supply a comma-separated list of column labels and/or column titles and/or column numbers for tables used for chart data. This applies to all tables processed. Columns are enumerated starting at 1. Column label is the text for the column in the header row. Column title is the HTML title attribute for the column in the header row.
dataOrientation Nohorizontal

The content orientation. By default, the data tables will be interpreted as columns (horizontally) representing domain and x values.

Available values:

  • vertical  –  data table columns will be interpreted as series.
  • horizontal – data tables rows will be interpreted as series.
timeSeries Nofalse

If 'true', the x values in an XY plot will be treated as time series data and so will be converted according date formats.

dateFormat NoConfluence language defined date formatsFor time series data, the date format allows for additional customisation of the conversion of data to date values. If a dateFormat is specified, it will be the first format used to interpret date values. Specify a format that matches the time series data. See simple date format.
timePeriod Noday

The time period for time series data. Defines the granularity of how the data is interpreted.

Available values: millisecond, second, minute, hour, day, week, month, quarter, year

languageNo(None)

Use in combination with the country parameter to form a locale. These additional number and date formats will be used for data conversion before the default languages.

Available values are the two-character ISO 639-1 alpha-2 codes.

countryNo(None)Use in combination with the language parameter to form a locale. Valid values are the two-character ISO 3166 codes.
forgiveNotrue

Determines whether the macro will forgive (allow) some data formatting errors.

Available values:

  • true — the macro tries to convert numeric and date values that do not totally match any of the default or user-specified formats.
  • false — the macro enforces strict data formatting. If there are data format errors, the chart will not be produced.

Chart colour parameters

Colours are specified using hexadecimal notation or HTML colour names.

ParameterRequiredDefaultDescription
bgColor NoWhiteBackground colour of the chart.
borderColor NoNo borderColour of the border around the chart.
colorsNo A comma-separated list of colours used to customise the colours of categories, sections, and series.

Chart axis parameters

Depending on the chart type, the range and domain axis may be customised. These values are automatically generated based on the data but can be overridden by specifying one or more more of these parameters.

ParameterRequiredDefaultDescription
rangeAxisLowerBound No(None)Minimum value for the range axis.
rangeAxisUpperBound No(None)Maximum value for the range axis.
rangeAxisTickUnitNo(None)Range axis units between axis tick marks.
rangeAxisLabelAngleNo(None)Angle for the range axis label in degrees.
domainAxisLowerBoundNo(None)Only applies to XY plots. Domain axis lower bound. For a date axis, this value must be expressed in the date format specified by the dateFormat parameter.
domainAxisUpperBoundNo(None)Only applies to XY plots. Domain axis upper bound. For a date axis, this value must be expressed in the date format specified by the dateFormat parameter.
domainAxisTickUnitNo(None)Only applies to XY plots. Domain axis units between axis tick marks. For a date axis, this value represents a count of the units specified in the timePeriod parameter. The timePeriod unit can be overridden by specifying a trailing character: y (years), M (months), d (days), h (hours), m (minutes), s (seconds), u (milliseconds).
domainAxisLabelAngleNo(None)Only applies to XY plots. The angle for the domain axis label, in degrees. 
categoryLabelPositionNo(None)

Placement of the axis label text for categories.

Available values:

  • up45 — 45 degrees going upward
  • up90 — 90 degrees going upward
  • down45 — 45 degrees going downward
  • down90 — 90 degrees going downward
dateTickMarkPositionNo start

Placement of the date tick mark.

Available values:

  • start — tick mark is at the start of the date period.
  • middle — tick mark is in the middle of the date period.
  • end — tick mark is at the end of the date period.

Pie chart Parameters

ParameterRequiredDefaultDescription
pieSectionLabelNoShow only the pie section key valueFormatof pie section labels. The format uses a string with special replacement variables:
  • %0% is replaced by the pie section key.
  • %1% is replaced by the pie section numeric value.
  • %2% is replaced by the pie section percent value.

Example 1: To display something like 'Independent = 20':

%0% = %1%


Example 2: To display something like 'Independent (20%)':

%0% (%2%)
pieSectionExplodeNoNo exploded sectionsA comma-separated list of pie keys that are to be shown exploded. Note: requires jFreeChart version 1.0.3 or higher.

Chart attachment parameters

These are advanced options that can be used for chart versioning, to enable automation and to improve performance. Use these options carefully! Normally, the chart image is regenerated each time the page is displayed. These options allow for the generated image to be saved as an attachment and have subsequent access to re-use the attachment. This can be useful especially when combined with the Cache plugin to improve performance. Depending on the options chosen, chart images can be versioned for historical purposes.

ParameterRequiredDefaultDescription
attachmentNo(None)

The name and location where the chart image will be saved as an attachment. The user must be authorised to add attachments to the page specified.

Available syntax for this parameter:

  • ^attachmentName.png — the chart is saved as an attachment to the current page.
  • page name^attachmentName.png — the chart is saved as an attachment to the page name provided.
  • spacekey:page name^attachmentName.png — the chart is saved as an attachment to the page name provided in the space indicated.
attachmentVersionNonew

Defines the the versioning mechanism for saved charts.

Available values:

  • new — creates new version of the attachment.
  • replace — replaces all previous versions of the chart. To replace an existing attachment, the user must be authorised to remove attachments for the page specified.
  • keep — only saves a new attachment if an existing export of the same name does not exist. An existing attachment will not be changed or updated.
attachmentCommentNo(None) Comment used for a saved chart attachment.
thumbnailNofalse

 If true, the chart image attachment will be shown as a thumbnail (small, expandable) image.

Storage format example

Below is a simple example of a pie chart. See more examples in Storage Format Examples for Chart Macro.

Wiki markup example

Below is a simple example of a pie chart. See more examples in Wiki Markup Examples for Chart Macro.

119 Comments

  1. Is there a way to control the color of the text labels?

  2. Anonymous

    Hi,

    Is there a way to insert a numeric value in the body of a bar in the bar graph?

    Thanks

    1. I am sorry that this feature is not available in the macro. Perhaps, this feature request might be the one you after?

  3. Anonymous

    Hi,

    Does this macro allow you to use an attachment (say a CSV file) as the data source?

    Thanks.

    1. Hi,

      This is possible with the use of another plugin called CSV Macro.

      Hope this helps.

      Cheers
      JSashi

      1. Hi,

        What happened to the CSV Macro? The link above no longer works and I can't find it in the MarketPlace

        1. That was a really old link. CSV Macro is part of the Table Plugin (marketplace listing) and all the documentation is hosted on a new site. See Table Plugin for Confluence and CSV macro

          1. Awesome, thanks - I already own your Table plugin.

            I now have it up and running

  4. Anonymous

    Hi,

    Can you chart off a "dynamictable" macro?

    Steve.

    1. Hi Steve,

      I am afraid that the feature requested is not available yet. Since, the dynamic macro is not part of this list:

      However, you might want to raise a feature request in JIRA:

      Hope that helps.
      Best rgds,
      Zed

    2. You can make a chart off of almost any table that contains the right data.

  5. Anonymous

    Can I change the line style on a line graph?  I'd like to make some dashes as opposed to solid.

    1. Hi,

      I am afraid that this is not currently possible. However, I have found a similar feature request Please add yourself as a watcher, vote for this feature and add your own comments to this feature request. For further details on how we include new features and improvements, you might want to read this page

      Cheers
      JSashi

  6. Anonymous

    Is there a way to specify the colors of the wedges of a pie chart?

    we use green = on time, blue = late and red = very late. The standard colors work OK; however, if there are none in a particular category, the colors move around.

    This one works:

    But this one does not:

    Thanks for your assistance,

    1. Anonymous

      Have you tried adding a wedge with a value of 0 as a place holder to keep the color assignments the same?

  7. Anonymous

    Is there any way to make multiple charts from one table. ie use columns 1,2 and 3 of a table for one graph and then 1,2 and 5 for some other graph? This is pretty much essential if the table's are generated by sql queries (and the SQL macro) because it becomes very inefficient to run 5 similar queries for 5 graphs.
    Thanks

    Iain

    1. Put the sql query on a separate page surrounded by the cache macro. Include the sql page for each chart using the include macro. Use the columns parameter in the chart macro for the column selection.

      1. Hi Bob - have there been any updates to facilitate multiple charts based upon a single table?  Or, is using the Cache macro still the only recommended solution?  Thanks for your help.

         

        1. No updates. Yes, the cache macro is the current solution. 

  8. Anonymous

    Is it possible to add a vertical line to mark the median value on the x axis? For example, when charting a count of items by age, to indicate the median age. Thanks

  9. Hi,

    Is there a way to view the data labels ( like in excel) in a graph?

    I am not referring to the label name but to the value of the graph column.

    Thanks,

  10. I'd like to create a line chart where some of the lines don't extend all the way to the right, as used in an "actual vs. plan" chart.  However, if I leave the corresponding cells of the input table blank, they are treated as zeros, resulting in the line dropping to the x-axis at the point of the nulls and continuing on from there.

    Am I missing something?  Is this a feature request matter?  Has a request already been submitted?

    Thanks in advance for any info.

    Pete Alfvin

    P.S. I tried to include an image to show what I was looking for, but it wouldn't let me drag/drop a .jpg file from my desktop through Insert Image.

    1. Anonymous

      Same thing happened to me and I separated the data into two tables to work around the issue.

      Instead of:

      {chart}
      || Date || Planned || Actual ||
      | Jan 1 | 100 | 100 |
      | Jan 2 | 75 | 75 |
      | Jan 3 | 50 |    |
      | Jan 4 | 25 |    |
      | Jan 5 | 0  |    |
      {chart}

      Do this:

      {chart}
      || Date || Planned ||
      | Jan 1 | 100 |
      | Jan 2 | 75  |
      | Jan 3 | 50  |
      | Jan 4 | 25  |
      | Jan 5 | 0   |
      
      
      || Date || Actual ||
      | Jan 1 | 100 |
      | Jan 2 | 75  |
      {chart}

       

      Each day you add a value to actual, you create the row with the date and actual value.

      1. I try the same thing but my table is created by SQL queries and the head row, where you have "Date, Actual", is dynamic

        so it is like

        || Date || Pl || P2 ||
        | Jan 1 | 100 | 100 |
        | Jan 2 |    | 75 |
        | Jan 3 | 50 |    |
        | Jan 4 |    | 25 |
        | Jan 5 | 0  | 40 |

        and there can be a P3 or even P4 too
        so I really need it not to show the empty spaces as zero because can be misleading.
        Is there a way to not include those points in the chart?

        any info is appreciated

  11. Anonymous

    If I have an SQL plugin returning multiple tables, is there a way to have multiple charts based on that content? Splitting the SQL isn't an easy option since the data is built dynamically from relatively complex SQL.

    1. Almost (sad). The tables parameter is meant for things like this. It is a way to specify explicitly what tables in the body are to be used for a chart. Macros like sql, table-plus, csv, excel all have an id parameter to explicitly put an id on a table. Unfortunately, the sql macro does not auto-increment the id for multiple result set tables. I have created SQL-109 to cover this case.

      1. Anonymous

        Thanks! So the multiple chart macros don't need to wrap around the SQL macro if the tables are numbered are somewhere in the page body? Have I got that right?

        1. I wasn't as complete as I needed to be. Any tables the chart macro needs to access MUST be in the body of the chart macro. In your case you probably need to use this technique as well once the issue gets fixed.

  12. Is there a way to drill down on charts? In other words, can I make the data points on a chart dynamic?

  13. Anonymous

    Is there a way to limit the width of the chart to a certain number of pixels irrespective of the data domain ?

    ^|____,____100

    and for same width in pixels

    |____,_____20

  14. Anonymous

    How to show DateTickMarks in "xyline" charts?

    How to use domainAxisTickUnit in "line" chart? This setting is neglected.

    How to change order of functions on "xyline" and "line" charts? Function drawn later overlaps function drawn earlier.

    Thanks

  15. Anonymous

    Is there any possible way to develop a time series chart but instead of a line, it has the area shaded in??

  16. Anonymous

    Is it possible to have a hyperlink in the chart? So when i press my line I get forwarded to another page?

    1. Anonymous

      Have you figured out how to get the drill through working?

      1. I have used imagemap macro in the past for things like this.

  17. Anonymous

    Can i have a chart with x-axis = day and y-axis = hour of the day?

  18. Anonymous

    Is the Gantt option of the chart macro still in beta? I am having trouble using it because the example code is not working for me

    Thanks!

  19. Why isn't it possible to set the stacked=true parameter on the XY-plots charts.

    I've a timeseries data-range with 1 year of data, for each day a value. Plotting this in an Area chart the x-axis losses precision. With the xyArea chart I can set the domainAxisTickUnit=1M parameter. Which result in a nice x-axis showing each month!

    The data really makes more sense showing stacked. So I've to use the area chart, now I'm missing the x-axis :-(

  20. Anonymous

    Hi - is there a list of colours that can be used?

    Thanks and kind regards from Switzerland

  21. How do i turn a table (a SQL result) like this into a bar chart where y axis is Hours and the x-axis has a bar for each pair of User,Customer:

    User

    Hours

    Customer

    Paul

    30

    C1

    Paul

    2

    C2

    Lola

    3

    C3

    Using type = bar and dataOrientation=vertical does not work. Even tried with yLabel=Hours
    Been struggeling for hours! :D Would really help my company.

    1. Hi Kenneth,

      This may not be the most helpful answer, but combining the User and Customer data into a single column with type bar" and orientation "vertical" accomplishes what you want, e.g.

      {chart:type=bar|dataOrientation=vertical|displayData=true}

      User+CustHours
      Paul (C1)30
      Paul (C2)2
      Lola (C3)3
      1. Anonymous

        Hi, I have a similar question.

        I am looking to use a BAR chart to display different arrival times of our input files for a given day.

        Hence my data looks something like this:

         

        File #Arrival Time
        File 1  2012-05-02 00:29:30.123
        File 2 2012-05-02 01:29:30:123 
        File 3 2012-05-01 23:59:20.123 

         My chart has:

        |type=bar|dataDisplay=true|width=1100|height=400|legend=true|dataOrientation=vertical|ylabel=Time

         But this isn't quite working out as I expect

  22. Anonymous

    I'd like to mark today's date in a gant chart with a vertical line, is that possible?

  23. Anonymous

    Dear All

    Is it possible to assing rangeAxisLowerBound to the minimum value automatically in dataset. I only see manual forcing of lower and uppper bound something like  |rangeAxisLowerBound=0I.

    Thank you very much.

     

  24. Anonymous

    I liked the old version of this page much better. In the new version it is not clear how the parameters are named.

    For example, the parameter borderColor is now called "Border Colour". This isn't very helpful (sad)

    1. I agree completely - some names are directly related to what's in the description - e.g. dateFormat = "Date Format" but parameter rangeaxisupperbound is not intuitively obvious from "Range Maximum Value"  though the Domain axis appears to be better.

      I actually downloaded and scrounged the source to get to that ... grrr.

      1. Hi Mike,

        Thanks for your comment. By way of explanation, the parameter descriptions on this page match those in the Macro Browser, which is what you use to configure macros in Confluence 4.0.

        I assume that you are using a version of Confluence earlier the 4.0. I think you will find the information you require if you refer to the version of the documentation that is relevant for your version of Confluence. Links are available at the top left of this page.

        I hope this helps,

        regards

        Paul

  25. Wouldn't it be nice to include a code block with each example? You know, if only Confluence allowed you to do something like that...

     


    Pie Chart Example:

    Chart Code
  26. Anonymous

    Is there a reason why there is no selection in the parameters for the type of chart? Any time I make an edit to my bar chart, it reverts back to a pie chart and I have to start over again. I cannot seem to even open the wiki markup anymore to make the adjustments. 

  27. Anonymous

    Regarding the chart type bar parameters: Is there any way of displaying the numeric amount values over each specific bar?

  28. Anonymous

    The following parameters are documented wrong in the table above and they really should be:

     

    Range Axis Lower BoundnoneRange axis minimum value (ie y axis minimum)
    Range Axis Upper Bound
    noneRange axis maximum value (ie y axis maximum)
    Display Datafalse

    Sets whether to display the rendered body of the macro (usually the data tables). By default, the chart data table isn't rendered.

      • before — the data are displayed before the chart.
      • after — the data are displayed after the chart.
      • true — the data are displayed after the chart (same as the after parameter)
    1. Thanks for your comment!

      You are describing an older version of Confluence, while this page describes the Chart Macro in Confluence 4.0.x.

      regards, Paul

  29. I'd like to display stacked values in a bar chart considering it's percentage in y axis. Let's say we have following table

    IngredientsSand1Sand2
    Bacon4516
    Green stuff58

    It should display 2 bars, one for Sand1 and one for Sand2, both bars should have same size and vary colors according to percentage. Say, Bacon-color in Sand1 should cover 90% of the bar, Green stuff color should use the 10%... same applies for Sand2's bar, 67% for bacon 33% for green stuff.

    Is this currently supported in chart macro?

     

    thanks in advance!

  30. Anonymous

    In confluence 4.1 how to create different chart types using Jira filters (jiraissues) and use them in WIki?

  31. Happy Valentines Day Bob!

    I was wondering if there was anyway to chart the following data without separating it into individual data sets:

    DateTimeValue
    2011-09-0110:00:005.5
    2011-09-0112:00:005.8
    2011-09-0210:00:003.4
    2011-09-0212:00:003.6
    2011-09-0310:00:004.1
    2011-09-0312:00:004.4

    So that it would have 3 lines (2011-09-01, 2011-09-02, 2011-09-03), Time on the X axis, and Value on the Y axis.

    Thank you in advance!

    1. I don't think so (sad).

  32. Anonymous

    Is there a way to just have the chart macro add the chart as an attachment to the page but not have it show up on the page?

  33. Hi,

    How to turn the time series chart X axis word direction? I've tested the examles, but the year is stacked. It's very mess.

    Thank you very much

    1. Probably you want: categoryLabelPosition=up90

      1. Hi Bob,

        Thanks in advance for your reply, but it seems was not working. I reply the screenshot to you in email, could you plesae check again?

        Regards

  34. Anonymous

    Excuse me, how can I align my chart to right side of the page?

    Thanks.

    1. Use the section/column macros or the float macro - {float: right}

  35. Anonymous

    Hi there,

    I'm using a timeSeries chart and I'm wondering if there's a way to specify missing values in some way and have a break in the timeSeries line to reflect that.

    For example, I might have data from a measurement instrument for March 11th, 12th, 14th, and  March 15th, but nothing for March 13th. Is there a way to have a line drawn for March 11th and 12th, a break, and then a line for March 14th and 15th?

     

    Thanks,

    Bill

     

  36. How do you get a bar chart to display negative values ?

    I have a table of neg and pos values which I want to display above and below the zero line, but the chart resolutely displays them all as positive numbers..

    Thanks Jason

    1. never mind - I worked it out, it was a scale thing.. normalise the candidate values and it all works

  37. Anonymous

    Is there a way to insert a numeric value in the body of a bar in the bar graph?

  38. Anonymous

    Hi,

    I have made a line graphs by taking the values from mysql database. I want to know that is it possible to display the values of all the points on this line, just like in excel sheet graphs?

     

  39. Would be very useful for scientific work if the bar graphs supported error bars.  ( Letter "I" shaped lines at top of bar showing uncertainty in metric. )

     

  40. I want to be able to show both line data and bar data on the same chart.  Is it possible to do this using the chart macro?

    Thanks,

  41. Anonymous

    Is it possible to add a comment on the generated graph? like a arrow pointer explaining the spike or downward trend.

  42. Hi,

    I am using Bar Chart to represent some information that I take from the database. But it doesnt come out as it does on this page "Fish Sold" example where bars are side to side for each year. In my case the bars are shown above each other (so basicly there is only one chart for each year where fish types are represented with different colors)

    when I use the SQL statement without the chart, I get this

    Name2012-12-12012-12-5
    KO143
    KO233

    how can I get this in the form of the "Fish Sold" example ?

    thanks in advance

    1. Works exactly the same here. Make sure you don't have the stacked option chosen. 

  43. I did have the stacked option chosen.

    thanks

  44. hey,

    I try to create a line chart from the info I take from database, where I have projects (P1, P2, ...) and some read values of the projects at different times (Jan 1, Jan 2, ...)

    my problem is that, the blanks on the table below are represented as "0"s on the line chart which is very misleading because 0 means something totally different.

    I can not use multiple sql statements in the chart section because P1, and P2 are dynamic (they are the projects in the database)

    so it is like

    || Date || Pl || P2 ||
    | Jan 1 | 100 | 100 |
    | Jan 2 |    | 75 |
    | Jan 3 | 50 |    |
    | Jan 4 |    | 25 |
    | Jan 5 | 0  | 40 |

    and there can be a P3 or even P4 too
    so I really need it not to show the empty spaces as zero because can be misleading.
    Is there a way to not include those points in the chart?

    any info is appreciated

  45. Anonymous

    It would be helpful to be able to control the font size of the text labels and legend in the pie chart, is this possible?  I don't see any way to do this in any documentation, but thought I'd ask.

  46. Is there a way to control granularity of the range tick units? For example, I'm attempting a chart that displays scientific data to the tenths decimal place, but cannot get my range values to display anything other than whole numbers.

     

    As it is now:

    90

    89

    88

     

    What I am trying to accomplish

    90.00

    89.75

    89.50

    89.25

    89.00

  47. I need to create a "sales funnel" chart similar in design to the following image..

    does anyone know of a method or a plugin that would achieve this ?

     

    Thanks

  48. Anonymous

    I have an Macro Enabled Workbook (excel file) that I want to generate my graphs from. Currently it generates the graphs from the ".xls" version of the vile, but when I upload the ".xlsm" version of the same file the charts show up blank. Is this a limitation of Confluence?

  49. Anonymous

    Is it possible to create a chart based on the results of a JIRA filter? 

  50. I've tried a lot but could not get the "Time Series Chart" example from above running if the two tables do NOT have the same first date column:

    How to get these two tables correctly being displayed?

    DateProdA
    12/20121
    03/20132
    04/20134
    DateProdB
    01/20136
    03/20135
    05/20132

     

    I always get a chart where the x-axis shows: 12/2012, 03/2013, 04/2013, 01/2013, 05/2013

    So first the chart macro collects all x-values from 1st table and then just add new x-values from 2nd table at the end instead if fitting in between at correct location.

     

    I tried different fomattings like Jan/2012, January 2012,... and played around with parameters, but...

    Any idea how to get an incremented time series displayed as chart?

  51. The table-filter macro doesn't work inside the chart macro because the character " is replaced by " in the javascript

    Example:

    is replaced by :

    The error Uncaught SyntaxError: Unexpected token & is raised by Chrome.

    Any idea how to fix the problem ?

  52. Anonymous

    i want to make an XY recorder showing the plot between Pressure and Flow rate. How to write the macro code for this problem?

    pls help.

    n

  53. Wow... gannt had been in beta from 2011?....

    It's time to get rid of Gantt option from chart plugin.

  54. Anonymous

    Hi,

    I using .xlsx files to create charts. Is there any way to get floating values?

    In my pages, 10.25 (ten dot twenty five) is read as 1025 (thousand twenty five)..

    Cheers (smile)

  55. The width and height options don't work as expected, has anyone else faced this?

  56. I am using the chart macro to render a stacked bar chart from a table.  For simplicity I will call the fields Label, Date and Number. The first column is for label, the remaining columns are dates and number is populated as appropriate for each row/column.

    Label08/05/201308/06/201308/07/2013
    RowA56 
    RowB 5 
    RowC2  

    I have the chart displaying stacked bars that show dates across the x axis and stack the number values within each date.

    My issues is that if I don't have any values for a certain date (indicated by a column with no dates, i.e 8/7/2013 above), the chart does not include this date where I would like it to.

    Is there a way to force the chart to include those columns on the x axis even when there is no data to display?

    1. Robert, I've posted a similar questions some comments above...but unfortunately did not get any comment or tip...

  57. So, I'm trying to create a Gantt chart, and would love to have this working, but I can't figure out what the heck is going on.  Selecting Gantt does not give me anything.  I got a stacked bar to sort of work, but can't get the time on the horizontal axis.  Does anyone know of any documentation that would help me get the gantt chart working or any suggestion on a different macro?  

  58. Anonymous

    I have the same issue..

     

    How to popluale the table in order to get the Gantt chart working

     

    /johan

  59. Anonymous

    Is it possible to display Legend vertically?

  60. Is there a way to pull data from tables nested in several pages to create a graph?

     

    I have three teams, all with their own line graph setup using the Chart plugin (so they each have their own table containing data) on three separate pages within the same space. On another page I would like to have a multi line chart with consolidated data from each of those tables.

    Is this possible?

    1. Yes, you probably can depending on the data and chart type. The chart macro has a tables parameter which allows you to specify a list of table ids to be included in the table (and ignore other tables). Go to each page and find the table you want. Depending on how the table was produced you can either assign a specific table id (like if you used the sql or csv macros) ot use the table-plus macro to assign a specific id to the table. On the aggregating chart macro, use the include macro to include the other pages in the macro body.

      1. Hi Bob,

        Thanks for the fast reply. I have now added table ID's to the tables on all of my pages but I must be missing something as I cannot make it work;

        Some information on how I have set it up is as follows, and forgive me as I am relatively new to condluence.

        Table 1 created using macro Table Body (tbody) and given the ID - Table1
        Table 2 created using macro Table Body (tbody) and given the ID - Table2
        Table 3 created using macro Table Body (tbody) and given the ID - Table3

        All of the above tables are working in relation to their own charts

        On a separate page, I have created a new Chart but am having issues locating a Macro called include-macro So I am getting lost at this step.

        I have also tried to find the macro table-plus which I cannot locate in my list in the "select macro" section. I am using the hosted version and according to this page says it should be included.

        Any further assistance would be greatly appreciated.

        1. Anonymous

          Hi Bob.

          After some playing outside the pressures of work I have managed to make it work.

          Many Thanks

          1. Good. Sorry, I had a typo on the include (include page) macro. Corrected above.

            Regarding table-plus, it is included with OnDemand, however may not be enabled on your install - an admin needs to look for the Table Plugin in manage add-ons and enable it. 

  61. Is it possible to displayData to the right or left of a chart rather than before or after?

    1. No, not directly. That would be a nice improvement though. You can get the same result with a little extra work using layouts or section/column. If the data is inline, you could put it on a separate page and include it twice, once in the chart macro and once in the other column.

      1. Thank you for the quick reply.  I'm using the sql plugin to pull in the data and can include the data twice to build the chart and then list as a table.  However the autoTotal does not appear work in the sql macro when it follows the chart macro and this is needed for what I am trying to display.  Any idea how to get the autoTotal to work?

         

        1. Hmmm, that is quite an old problem. Are you current with the SQL plugin? If you are and it is still occurring, open an issue with more specific details as I cannot reproduce that. It has to do with missing javascript. Even if you have an older version, you can work around that by placing an empty csv macro at the top of the page.

          1. I am using an older version and the empty csv macro did the trick!

            Thanks!

  62. Anonymous

    Category Label Position doesn't seem to be working.

    I tried all options, but still the date labels are overlapped and messy.

    Anyone has any idea?

    Thanks alot!

     

     


  63. Anonymous

    Category Label Position doesn't seem to be working.

    I tried all options, but still the date labels are overlapped and messy.

    Anyone has any idea?

    Thanks alot!

     

     


    1. It does work in general (smile). Try again or show us your example that doesn't work.

  64. is there a possibility to create more than one chat per datasource? At the moment I need to copy the datasource to create two or three different charts and filling our the datasources three times is a time killer

    1. I assume you mean query. Put your query on separate page and then use the include page macro to include it into each of the chart macros where you need the data. Consider using the cache macro on the query page to save resources.

  65. Hi,

     All that i want to generate a line chart using the below two tables.

    But for 2nd table data connected line not shown properly.

     Whereas if I prepare XYLine chart or Timestamp Chart for the same then the data shows correctly.

     Is there a way to get an ideal line chart for below data?

    Issue_Creation_DateIssue_Reported (Cumulative Sum)
    2013-12-0921
    2013-12-1022
    2013-12-1126
    2013-12-1227
    2013-12-1336
    2013-12-1637
    2013-12-1739
    2013-12-1840
    2013-12-2042
    2013-12-2352
    2013-12-2455
    2014-01-2272
    2014-01-2385

     

     

    Issue_Resolution_DateIssue_Resolved (Cumulative Sum)
    2013-12-105
    2013-12-1120
    2013-12-1223
    2013-12-1326
    2013-12-1630
    2013-12-1731
    2013-12-2035
    2013-12-2439
    2014-01-2243
    1. Are you using timeSeries for the first table?

      Just a guess but your problem maybe the type of chart your using (most likely timeseries) cannot handle non-consecutive dates, where your parameters are days apart.. eg in your second table there is a gap between your dates. Therefor you may have to use another type of chart.

       

  66. Hi Bob,

    I am using a bar chart, where some of the bars I want to be different color based on another column. for example if the severity = 2 then have the bar color red, if severity = 1 then bar color amber. So far all the bars are just one color. If there any way to do this? this would be a great feature if it has not been used already 

    My table I want to extract from looks like this but with more data.

    DateDescriptionSeverity
    20/1492%2
    21/1414%0
    22/1474%1
    23/1493%2
    24/1425%0

     

     

     

    1. Not that I know of.

  67. Hi, is it possible in a timeseries graph to add vertical date markers on the graph for important (configurable) dates, such as today's date or release date? Similar to the Version Report in the Agile Reporting charts.

  68. Hi,

    I'm using the gantt chart to display activities happening within one day. Whilst the macro displays exactly down to hours and minutes, the scale doesn't adjust to show more detail e.g. hours or quarters of a day or so. is this a limitation of the macro?

    Thanks for your help

    1. Try setting the domainAxisTickUnit using:

      yyear
      Mmonth
      dday
      hhour
      mminute
      ssecond
      umillisecond
      1. Thanks Bob for the quick response. I've tried to modify the chart using various combinations of this, but the chart seems to ignore whatever I enter into the domainAxisTickUnit parameter. Are you able to provide an example?

        1. Sorry, no, it was just a guess on my part. If that doesn't do it, then I would suspect it just not supported.

  69. Hi,

    is it possible to configure the bar chart that was, that the axis will only show integer (not decimal) values ? To prevent this I´m using currently the setting "Range Axis Tick Unit" , but this way is quite inflexible in case of highly different variance for totals in the chart, so would be much easier just to set a setting like "axis values" = "integer" 

    Thanks Anja

    1. I was looking for a feature like this as well. Thanks, Andreas