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

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.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Published 12 hours ago in Confluence

Think you know shares vs. @mentions in Confluence? Take this collab quiz.

To anyone who doubts that Atlassians are a little too obsessed with collaboration, and tools related thereto, let me describe a recent discussion we had (which took place on our internal Confluence, ...

95 views 2 4
Read article

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