Forum Discussion
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?
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"],
1 Reply
- santiagomur
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"],