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 ?
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.
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.
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:
Navigate to the Chart from Table macro and use this new column to color your bar chart ("Look -> Select colors -> Colors in table columns"):
Seems that it's exactly your case, hope it helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.