Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Can we have conditional formatting for charts by using Chart from table Macro

Harsh Shridhar
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 6, 2022

I want to color bar charts based on certain value, for example any bar having value more than 5 should display red and less than should display Green. Can we accomplish that in Chart from Table macro ?

1 answer

4 votes
Katerina Kovriga _Stiltsoft_
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.
October 7, 2022

Hi @Harsh Shridhar ,

Unfortunately we don't have such option. You may check how to set colors for the Chart from Table macro in our documentation: select the required chart type in the page tree and navigate to the corresponding section.

The conditional formatting is available for tables and supported by the Table Transformer and Table Spreadsheet macros.

Katerina Kovriga _Stiltsoft_
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.
October 7, 2022

Hi @Harsh Shridhar ,

This is me once more time - I've consulted with our developers and understood that I've missed an obvious workaround for your case: please create a sequence "source table <- Table Transformer <- Chart from Table" inside the Table Toolbox macro.

Fri 9-1.png

Now go to the Table Transformer macro and set the conditional formatting for your future graph here:

SELECT *,
CASE WHEN 'Weight' < 20
THEN "#99b3ff"
WHEN 'Weight' >= 20 AND 'Weight' < 40
THEN "#ff99e6"
ELSE "#ff9999"
END
AS 'Color'
FROM T1

As you can see, we create a new column with HEX color codes based on the conditional formatting in the query:

Fri 9-2.png

Navigate to the Chart from Table macro and use this new column to color your bar chart ("Look -> Select colors -> Colors in table columns"):

Fri 9-3.png

Seems that it's exactly your case, hope it helps. 

Like # people like this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events