bar chart change color
Asked by Karthikeyan A:

Is there anyway to assign colors to bar chart


Answers:
author: Davin Studer
body: Yep. In the macro properties it is the Colors field.

image2014-10-14 10:44:43.png

image2014-10-14 10:45:32.png  
[](https://community.atlassian.com/t5/Confluence-questions/bar-chart-change-color/qaq-p/45578?attachment-id=2035){#link_119310bf8bc897}  
[](/tnckb94959/attachments/tnckb94959/confluence-questions/7742/1/image2014-10-14%2010%3A44%3A43.png){#display_119310bf8bc897_0}  
[](https://community.atlassian.com/t5/Confluence-questions/bar-chart-change-color/qaq-p/45578?attachment-id=2036){#link_119310bf8bc897_0}  
[](/tnckb94959/attachments/tnckb94959/confluence-questions/7742/2/image2014-10-14%2010%3A45%3A32.png){#display_119310bf8bc897_2}

comments: author: Karthikeyan A
body: Thanks Davin. I would like to know if we can assign colors based on the table value(sql output).

eg:

col1 col2

AB 4

BC 10

DE 6

I want to assign red color for AB, green for BC , blue for DE and yellow for FG (FG row may or may be in the table based on sql query output).


author: Davin Studer
body: Are you saying that you want the color to change based on the value in col2 for each row? Or is a static color for each row what you want. I don't quite understand your previous comment. If you want it to be dynamic I don't think that is possible. If you want a static color, then your first color would be for row AB, the second would be for BC, the third for DE, and the fourth for FG ... if it exists. You can put in four values even if there are only three rows.


author: Karthikeyan A
body: thanks david. Sorry for not elaborating the questionthe color should assigned for values not for rows.if the query output isAB 4DE 6Then i want to see Red and blue bars. Is that possible?


author: Davin Studer
body: Like I said I don't think it is possible to assign the color based on the value returned in your query. I cannot think of an easy way to do it.


author: Karthikeyan A
body: thank you Davin


author: Katerina Rudkovskaya [Stiltsoft]
body: Hello [@Karthikeyan A](/t5/user/viewprofilepage/user-id/1040134) ,

Please note that using the [Chart from Table](https://docs.stiltsoft.com/display/public/TFAC/How+to+use+Chart+from+Table+macro) macro of [Table Filter and Chart for Confluence](https://marketplace.atlassian.com/apps/27447/table-filter-and-charts-for-confluence?hosting=cloud&tab=overview) app you can try the Multicolor scheme in the [Column chart](https://docs.stiltsoft.com/display/public/TFAC/Column%2C+Stacked+Column%2C+Bar%2C+Stacked+Bar+chart+types) type (since version 7.3.0):

![2021-04-23_22h38_03.png](https://community.atlassian.com/t5/image/serverpage/image-id/140222iA841BD74FA1C0FCB/image-size/large?v=v2&px=999 "2021-04-23_22h38_03.png")![2021-04-23_22h39_36.png](https://community.atlassian.com/t5/image/serverpage/image-id/140221iD50984842B8E3E66/image-size/large?v=v2&px=999 "2021-04-23_22h39_36.png")

Katerina  
Stiltsoft


author: Katerina Rudkovskaya [Stiltsoft]
body: Hello,

Please note that we've released the **7.9.0** version of [Table Filter and Charts for Confluence](https://marketplace.atlassian.com/apps/27447/table-filter-and-charts-for-confluence?tab=overview&hosting=cloud), added the capability to select custom chart colors from a table.

*Select the corresponding columns with colors for the **Colors in the table columns** option.*   
*You can use colors from [this list](https://www.w3.org/wiki/CSS/Properties/color/keywords) or define your own HEX code colors.*

*![2021-08-31_18h10_19.png](https://community.atlassian.com/t5/image/serverpage/image-id/158334iA800D12B58A6C42A/image-size/large?v=v2&px=999 "2021-08-31_18h10_19.png")*

Katerina  
Stiltsoft