How to automate data plotting in wiki chart?

I am using chart macro to plot line and bar graphs in my atlassian wiki.

However, I am editing the underlying table manually from data points gathered from another java utility.

I would like to automate this end to end process such that my utility gathers the data and updates the same in the wiki table which in turn will generate the charts.

How do i accomplish this? I have been searching for any API support from this chart macro plugin or something in line...

Note: I referenced https://confluence.atlassian.com/display/DOC/Wiki+Markup+Examples+for+Chart+Macro for using the charts in my wiki.

Thanks in advance!

DK

2 answers

1 accepted

A combination of SQL macro OR Beanshell macro along with Chart macro can be used to load the data.

https://bobswift.atlassian.net/wiki/display/SCRP/Beanshell+Macro

https://marketplace.atlassian.com/plugins/org.swift.confluence.sql

Adding to this, you can use anything that produces an HTML table in the body of the chart macro. Using sql or scripting as Renjith indicated. Other approaches are CSV using the CSV macro, XSLT Macro, HTML Macro, or other Confluence macros that produce tables.

Thanks Renjith & Bob.

Yeah, meanwhile, I came across the csv macro, and was checking that out :)

Will surely evaluate the options suggested you guys have suggested above!

Will get back if I face a roadblock.

Thanks again!

We use a solution that

(a) Gathers data to be plotted into an excel sheet.... we hve some python code that does this.

(b) Posts the above excel sheet to the wiki as an attachment to the page.... post to the wiki using xmlrpc via python.

(c) Use a chart macro in the wiki page to display the data in the excel sheet... you are probably already doing this.

The program that does (a) above is just a cron job and picks up data from a db which is where some other program stuffs the data offline. In some case these two are integrated.

Thanks for sharing your solution, Badrinath.

Here goes mine -

I am currently parsing my source html using jsoup and generating csv. This csv I am copying to a location which is accessible as a web url. Csv generation and availability in the accessible location is achieved through shellscript which runs as a cron job on daily basis.

This csv is being consumed by the wiki's csv macro, which is further nested in the chart macro (both line and bar).

Happy new year!

-Debasree

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published 10 hours ago in Off-topic

Get to know our Atlassian User Group Leaders from Bengaluru, India

Meet @Dinesh Dhinakaran, @Vishnu Vasudeva, @Rajeev Verma, and Jamshid Nalakath: Our extraordinary AUG leaders from Bengaluru, India. These four work together to strengthen the bonds of their local co...

85 views 0 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