Chart macro fails to render data

I’ve been trying to get the Chart macro working but I’m currently having trouble with getting it to display a chart based on a specific table.

To illustrate my problem, I currently have two tables inserted inside a Chart macro like so:

In the chart macro docs, it states:

You 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. 

This however doesn’t seem to work as I expected (or perhaps I’m missing something). For example, if I want to display a graph of the second table I input the number 2 in the Tables field and then save the page.

image

This, however, results in an empty chart with a message saying No Data Available.

image

Just wondering if this is a bug or whether I’m missing a step somewhere?

Storage Format for Reference
<ac:structured-macro ac:name="chart" ac:schema-version="1" data-layout="default" ac:local-id="0d792867-160e-40ce-9a83-281f1ac77785" ac:macro-id="f34bdda02ce9b66c1d5e949ce7b03123"><ac:parameter ac:name="tables">2</ac:parameter><ac:parameter ac:name="borderColor" /><ac:parameter ac:name="bgColor" /><ac:parameter ac:name="type">bar</ac:parameter><ac:parameter ac:name="title">Chart</ac:parameter><ac:parameter ac:name="colors" /><ac:rich-text-body>
<table data-layout="default" ac:local-id="ae7da777-045b-4417-8171-5082912a5201">
<tbody>
<tr>
<th>
<p style="text-align: center;"><strong>Year</strong></p></th>
<th>
<p style="text-align: center;"><strong>Revenue</strong></p></th>
<th>
<p style="text-align: center;"><strong>Expense</strong></p></th></tr>
<tr>
<td>
<p style="text-align: center;">2020</p></td>
<td>
<p style="text-align: center;">5</p></td>
<td>
<p style="text-align: center;">1</p></td></tr>
<tr>
<td>
<p style="text-align: center;">2021</p></td>
<td>
<p style="text-align: center;">10</p></td>
<td>
<p style="text-align: center;">2</p></td></tr>
<tr>
<td>
<p style="text-align: center;">2022</p></td>
<td>
<p style="text-align: center;">15</p></td>
<td>
<p style="text-align: center;">3</p></td></tr></tbody></table>
<table data-layout="default" ac:local-id="c3cda1a8-c523-492b-9cc3-360163d84b5c">
<tbody>
<tr>
<th>
<p style="text-align: center;"><strong>Name</strong></p></th>
<th>
<p style="text-align: center;"><strong>Age</strong></p></th>
<th>
<p style="text-align: center;"><strong>Height</strong></p></th></tr>
<tr>
<td>
<p style="text-align: center;">John Smith</p></td>
<td>
<p style="text-align: center;">23</p></td>
<td>
<p style="text-align: center;">1.75</p></td></tr>
<tr>
<td>
<p style="text-align: center;">Jane Doe</p></td>
<td>
<p style="text-align: center;">22</p></td>
<td>
<p style="text-align: center;">1.55</p></td></tr></tbody></table></ac:rich-text-body></ac:structured-macro>
<p />

Hi @rcsr,

I’ve played around with the macro and I also experienced some unexpected behaviours.

Would it be possible to use the “Insert chart” option instead?

This option is available when clicking on the table with a page in edit mode, here is how it looks like:

Cheers,
Caterina

Thanks @ccurti. I also noticed the new Insert chart feature works a lot better than the old chart macro. I might raise a bug ticket anyway just to keep track of this issue.

Thanks for the help.

1 Like