Confluence chart with MySQL

Rama Krishna B December 10, 2013

Folks,

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.

ramakris@gmail.com

1 answer

0 votes
Bob Swift OSS (Bob Swift Atlassian Apps)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 10, 2013

You need different column names. Use something like:

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

Rama Krishna B December 10, 2013

Bob,

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.

Bob Swift OSS (Bob Swift Atlassian Apps)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 10, 2013

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?

Rama Krishna B December 11, 2013

Bob,

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.

Regards,

RamaK

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events