Confluence chart with MySQL


I need to display a simple graph with Time on X axis and some values on Y axis and the values are being fetched from the SQL Database. I see that the values are being fetched.

I have a Chart Macro and underneath it I have two SQL statements wrapped under two SQL Macros (I followed Insert=>SQL Macro..) as defined below.

select date,bootupTime from CLOUD where ServiceProvider='PQR';

select date,bootupTime from CLOUD where ServiceProvider='TBS';

What I am expecting is that I need to plot the date (common between the two tables) on the X axis and the values from the columns from the two different tables on the Y axis . I am expecting to see two graph lines on the chart , one for one SQL statement and another for the other, but I am getting only one line being plotted. I am using a line chart.

What is the best way to accomplish this?

Appreciate any help.

1 answer

You need different column names. Use something like:

select date, bootupTime as "Boot PQR" from ...
select date, bootupTime as "Boot TBS" from ...


I tried that and it is still the same but still the same. I have the screen shot for you. Wondering if I can still use the "line" instead of the time series? Any help will be appreciated.

Line chart is fine, I have an example here that works fine. Use the chart macro parameter to show the data after the chart. Attach the screen shot of the chart and data. Just to be sure, what version of Confluence and chart plugin are you using?


I think I figured it out and managed to get it nearly working as I desired to get. Thanks a lot for your help and I really appreciate it.



Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Tuesday in Statuspage

Introducing Statuspage Getting Started guides! First up: What is Statuspage?

Over the next several weeks we'll be sharing some of our Getting Started guides here in the community. Throughout this series of posts, we'd love to hear from customers and non-customers ab...

203 views 4 1
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