Can I link the confluence chart macro with an external table?
Asked by James Mark Chan:

We are using a confluence page with a table to record test data. We want a chart to update based on this test data. Is this possible? We still want the table to be visible on the chart because it has a column for columns.


Answers:
author: Milo Test
body: I don't think that is possible. Take a look at Confiforms; it allows you to generate a chart based on data that is edited elsewhere.

comments: author: Alex Medved _ConfiForms_
body: [James Mark Chan](https://answers.atlassian.com/questions/users?username=jchan4) +1 to Milo's answer.

We are the authors of ConfiForms and will be happy to help you with what you want to build. It is totally possible with [ConfiForms](https://answers.atlassian.com/marketplace.atlassian.com/plugins/com.vertuna.confluence.plugins.confiforms)


author: Darrel Lee
body: He is wrong. Trying to sell his product?

You can use a CVS table macro inside the chart macro. Set the output format to wiki. The preview in the chart macro doesn't seem to work, but the chart renders on the page just fine. I am using Confluence 5.7.


author: Alex Medved _ConfiForms_
body: It depends on how often your CSV shall be updated. What Milo suggests is to keep and update the data with [ConfiForms](https://marketplace.atlassian.com/plugins/com.vertuna.confluence.plugins.confiforms/server/overview "ConfiForms - Data Forms & Workflows in Confluence") directly inside Confluence.

And build your charts on the data you have - using standard [Atlassian Chart macro](https://confluence.atlassian.com/doc/chart-macro-163415075.html "Atlassian Chart macro") or more advanced [Table Filter and Charts](https://marketplace.atlassian.com/plugins/com.stiltsoft.confluence.plugin.tablefilter.tablefilter/cloud/overview) mentioned by [@Andrey Khaneev _StiltSoft_](/t5/user/viewprofilepage/user-id/781696)

We specialise in this area - presenting the data from different sources, including external sources / systems

And have another option here to share. Yes, it is a plugin, we develop, it is called [ConfiDoc](https://marketplace.atlassian.com/plugins/com.vertuna.confluence.plugins.confirest/server/overview "ConfiDoc. Viewer for SQL, XML, JSON, CSV") and the example of [CSV showed on a page as a table and as a chart](https://wiki.vertuna.com/display/CONFIDOC/Consuming+CSV+file+from+attachment+and+showing+the+contents+as+table+and+in+a+chart "ConfiDoc app to show CSV in Confluence") could be found here.

Promoting someones product is not a bad thing, if it helps to solve the problem (and when the problem cannot be solved with Confluence standard options).

BTW, [@Darrel Lee](/t5/user/viewprofilepage/user-id/924045), you shall consider upgrading your Confluence version, [as it has reached EOL](https://community.atlassian.com/t5/Confluence-questions/End-of-life-Confluence-5-7-1/qaq-p/140270)


author: Bob Swift (personal)
body: You can include a table from various sources in the body of the built-in **chart** macro.

* a standard Confluence table (sounds like this is what you have)
* a separate page with the data together with an include page macro
* SQL data using the [SQL-query Macro](https://bobswift.atlassian.net/wiki/display/SQL/SQL-query+Macro?src=sidebar)
* Excel data using the view file or [Excel Macro](https://bobswift.atlassian.net/wiki/display/XL/Excel+Macro)
* CSV data using the [CSV Macro](https://bobswift.atlassian.net/wiki/display/TBL/CSV+Macro)
* HTML table using one of the **html** macros
* a bunch of other macros

Use the **Display rendered data** to display the data before or after the chart. Or if that is not sufficient, just put the data on a separate page and include it once in the **chart** macro and once by itself.

comments: author: Amit Ahuja
body: Can you please share an example ? I am trying to follow above but getting an error like:

Error rendering macro 'chart' : org.dom4j.DocumentException: Error on line 1 of document : Open quote is expected for attribute "id" associated with an element type "div". Nested exception: Open quote is expected for attribute "id" associated with an element type "div".


author: Mukund Iyer Rajamony
body: +1   
A simple example of the chart macro with data from outside would be most helpful.  
We would like to use the confluuence chart to update based on nightly test results for example.


author: Andrey Khaneev _StiltSoft_
body: Try [Table Filter and Charts](https://marketplace.atlassian.com/plugins/com.stiltsoft.confluence.plugin.tablefilter.tablefilter/cloud/overview) add-on, maybe it is what you are looking for.


Tags: chart

table