Chart Macro In User Macro With Dynamic Content Edited

I was trying to use the Chart macro inside user macro by using the following code,

    ## @noparams
    <ac:structured-macro ac:name="chart">
                  <ac:parameter ac:name="type">line</ac:parameter>
                  <ac:parameter ac:name="Tables">Sample</ac:parameter>
    </ac:structured-macro>

    <table id="sample">

                     ... body goes here...

    </table>

I am getting `No Data Available` in my confluence page. How can I provide the dat to a Chart macro dynamically?

1 answer

1 accepted

1 vote
Accepted answer

Chart macro is not compatible with dynamic tables, because it is build on the server side.

You can use Chart from Table macro (Table Filter and Charts add-on) instead, this macro is compatible with dynamic tables and charts are generated on the client side.

Is it possible to provide the table as part of the Macro declaration?  

Yes, you need to place your table inside: 

<ac:structured-macro ac:name="chart">
    <ac:parameter ac:name="type">line</ac:parameter>
    <ac:parameter ac:name="Tables">Sample</ac:parameter>
<ac:rich-text-body>
here goes the table
</ac:rich-text-body>
</ac:structured-macro>

Thank you so much Andrey.

You are welcome!

Can you insert data from other pages into your chart macro?  

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Feb 06, 2019 in Confluence

Try out the new editing experience

Hi team, I’m Avinoam, a product manager on Confluence Cloud, and today I’m really excited to let the Community know that all customers can now try out the new editing experience and see some of the ...

1,230 views 81 8
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you