Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hello,
I am assigning colors to each category using Host ColorPallet with `getColor` method. I have 2 pages with same categorical data being used but they will be filtered. The category color are not being synced on both pages when number of category data filtered. The color are being synced in inbuilt visuals like Line and Bar chart but in Custom Visual. Is there any other method or I am I missing something?
When increasing the selections from slicer the color are getting repeated but when we refresh the page its giving saperate colors to all . Is there anyway to refresh the visual ?
HI @Anonymous,
So you mean these setting only works on your custom visual instead of whole power bi visuals?
In my opinion, I suppose this part of properties not works on visuals that haven't configure these processings.
Add colors to your Power BI visuals - Power BI | Microsoft Docs
I'd like to suggest you use the theme file to apply the default 'data label' color sets instead.
Use report themes in Power BI Desktop - Power BI | Microsoft Docs
Regards,
Xiaoxin Sheng
Imagine this, I have 3 categories a,b,c. In one page user viewed all categories and in another page he filtered it to 1 category of 'c'. Now here the category colors for c is not matching in both pages even though they are same data. When user switches between the both pages color 'a' in first page and color 'c' in second page are same. Colors are being chosen as first color to first category basis.
Hi @Anonymous,
Visuals work independently of each other and have no knowledge of the data model, so colours will be assigned sequentially from the visual host's colorPalette object local to that visual. This is same behaviour for both core and custom visuals.
Therefore if you want colours to be consistent, you will need to data-bind them to instances of a visual, either by:
Regards,
Daniel
Proud to be a Super User!
On how to ask a technical question, if you really want an answer (courtesy of SQLBI)
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
11 | |
7 | |
2 | |
2 | |
1 |
User | Count |
---|---|
3 | |
3 | |
3 | |
2 | |
2 |