Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Is it possible to match color of legend column across all visualizations?

I have a Gantt chart and a donut chart.

I have dynamically populated column values for the legends on both of these charts. As the data is getting populated I noticed that the colors used for the Gannt chart are NOT matching those used in the donut chart.

I think this makes it difficult for new users of Power Bi to adopt this technology. I can't set the colors manually because it's alot of values and i want it to be dynamic.

Any guidance?

Thank you.

1 ACCEPTED SOLUTION
v-lili6-msft
Community Support
Community Support

hi, @Anonymous

 the color of legend column is filled dynamically by sort order of visual.

for example:

If I set "sort by" for Gantt chart to soft by Task Name desc

3.JPG

set "sort by" for donut chart to soft by Duration desc

4.JPG

Now colors of legend column of them are not matched

5.JPG

But when I set "sort by" for donut chart to soft by Task Name desc

6.JPG

Now colors of legend column of them are matched

7.JPG

So you could keep all the visualizations have the same "sort by", the color of legend column will be matched.

 

here is a demo pbix, please try it.

 

Best Regards,

Lin

 

 

 

 

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
v-lili6-msft
Community Support
Community Support

hi, @Anonymous


Could you please tell me if your problem has been solved? If it is, could you please mark the helpful replies as Answered?

 

Best Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Thank you! I had written this off as not possible, amazing!

Does this mean that it is impossible to match colors between two visuals, except if they display the same thing (like same figure, same order, same aggregation level...) ? Which is not a common case....

v-lili6-msft
Community Support
Community Support

hi, @Anonymous

 the color of legend column is filled dynamically by sort order of visual.

for example:

If I set "sort by" for Gantt chart to soft by Task Name desc

3.JPG

set "sort by" for donut chart to soft by Duration desc

4.JPG

Now colors of legend column of them are not matched

5.JPG

But when I set "sort by" for donut chart to soft by Task Name desc

6.JPG

Now colors of legend column of them are matched

7.JPG

So you could keep all the visualizations have the same "sort by", the color of legend column will be matched.

 

here is a demo pbix, please try it.

 

Best Regards,

Lin

 

 

 

 

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Lin,

 

Nice solution, is there a way to do something similar to get the colors aligned between a gantt chart and a Treee diagram?

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.