Uploading HTML with a chart

I am using jenkins to upload and replace the contents of a wiki page with an HTML doc.

I am trying to put in a line chart but I can't find the code that I need to put in for this to work.

So far I have either managed to completely break the page or only display the table for the chart (with a small box around it)

2 answers

0 vote
Davin Studer Community Champion Mar 18, 2014

I would recommend getting thisplugin if you don't have it.

https://marketplace.atlassian.com/plugins/com.atlassian.confluence.plugins.editor.confluence-source-editor

Next mock up a page in Confluence to look like what you want and then view the source of the page and find out exectly what the xml storeage format should look like and then replicate that.

Does this give difference source then if I right click the wiki page and click view source or if I click tools (on the page) >> view source?

Davin Studer Community Champion Mar 19, 2014

Yes. The macros are stored in an xml format in the database. When the page is rendered Confluence replaces the xml with the rendered version of the macro.

<table class="wysiwyg-macro" data-macro-name="chart" data-macro-parameters="type=line" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2NoYXJ0OnR5cGU9bGluZX0&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="RICH_TEXT"> 
<tr> 
<td class="wysiwyg-macro-body"> 
<table class="confluenceTable"> <tbody> <tr> 
<th class="confluenceTh"> </th> 
<th class="confluenceTh"> </th> 
<th class="confluenceTh"> </th> </tr> <tr> 
<td class="confluenceTd"> </td> 
<td class="confluenceTd"> </td> 
<td class="confluenceTd"> </td> </tr> </tbody> </table> </td> </tr> </table>

This is the closest I have gotten to getting this to work. When the page is edited I will have an empty table with a gray box around it. If I go to edit the page it will show the widget for a chart.

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
Kesha Thillainayagam
Posted Friday in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

274 views 11 10
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