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.
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!
My course: Introduction to Developing Power BI Visuals
On how to ask a technical question, if you really want an answer (courtesy of SQLBI)
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
16 | |
4 | |
2 | |
1 | |
1 |
User | Count |
---|---|
29 | |
3 | |
3 | |
2 | |
2 |