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
sp_mike
Helper II
Helper II

Report uses dataColors that are not in my custom JSON

I have a custom json with only a few datacolors:

"dataColors": [
 "#ff8899",
 "#9b0000",
 "#8d8d8d"
  ],

 

Now I added a clustered colomn chart which shows a lot of colomns/bars. It seems like when my custom dataColors are finished, PowerBI picks some new ones (which are not in my Json).

 

I anly added three colors as dataColors so I want PowerBi only use these three. Is that possible?

1 ACCEPTED SOLUTION
santiagomur
Resolver II
Resolver II

Power bi is going to pick the 3 custom colors from  "dataColors" and then is going to pick default random color.

 

the only way i know to force choose only this 3 is repeat them. 

for  sure is not the best way but it works.

is going to do this bar 1 =  "#ff8899", bar 2 =  "#9b0000", bar 3=  "#8d8d8d",

bar 4 =  "#ff8899", bar 5= "#9b0000" ........bar 16= random 

 

1-15 bars 

"dataColors": [
 "#ff8899",
 "#9b0000",
 "#8d8d8d",
  "#ff8899",
 "#9b0000",
 "#8d8d8d",

"#ff8899",
 "#9b0000",
 "#8d8d8d",

"#ff8899",
 "#9b0000",
 "#8d8d8d",

"#ff8899",
 "#9b0000",
 "#8d8d8d"],

 

 

View solution in original post

1 REPLY 1
santiagomur
Resolver II
Resolver II

Power bi is going to pick the 3 custom colors from  "dataColors" and then is going to pick default random color.

 

the only way i know to force choose only this 3 is repeat them. 

for  sure is not the best way but it works.

is going to do this bar 1 =  "#ff8899", bar 2 =  "#9b0000", bar 3=  "#8d8d8d",

bar 4 =  "#ff8899", bar 5= "#9b0000" ........bar 16= random 

 

1-15 bars 

"dataColors": [
 "#ff8899",
 "#9b0000",
 "#8d8d8d",
  "#ff8899",
 "#9b0000",
 "#8d8d8d",

"#ff8899",
 "#9b0000",
 "#8d8d8d",

"#ff8899",
 "#9b0000",
 "#8d8d8d",

"#ff8899",
 "#9b0000",
 "#8d8d8d"],

 

 

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.