Forum Discussion
Applying consistent color format across different graphs
Hi, I have two graphs. One is a treemap and other one is a bar graph both graphed using the same underlying variable. I am trying to map the color coding on the treemap to the bar graph without going and changing every bar color manually on the bar graph. How do I do this quickly? Thanks.
Sreeram
6 Replies
- Greg_DecklerCommunity Championsrkri - Perhaps by using a theme but otherwise, I am not aware of an automated way to do what you are asking.
- AnonymousNot applicable
I'm going through something similar and have put together a table with vendors and corresponding hex colors hoping that I can somehow use that.
I did see in a response somewhere that someone built a measure where they assigned color codes to each category being used in a visual but wasn't adept enough to use that to solve my issue.
If I can find that thread, I'll post if for you.
- AnonymousNot applicable
Here's a link to another similar discussion that may help: https://community.powerbi.com/t5/Desktop/Conditional-format-of-bar-chart-based-on-a-table-with-HEX-colour/m-p/1049726
I'm going to play with it to see if it helps with mine.
- AnonymousNot applicable
This will definitely work for the field map. Download the pbix that Icey gives in the accepted solution. He has created a measure to read a table with the "item" and hex code. He uses the measure in the "advanced controls" in the Data Color selection, using Format by: Field Value, Based on Field: Measure.
Unfortunately, my boss wants a pie chart or donut chart, so it won't work for me. But it does work on the Treemap so you should be golden.
- srkriMicrosoft Employee
Thanks dpeacock, let me give it a try.
- v-gizhi-msftCommunity Support
Hi,
To my knowledge, i think there is no such function can completely reach your requirement.
You can create an idea here, it will be very cool and practical!
https://ideas.powerbi.com/forums/265200-power-bi-ideas
Best Regards,
Giotto