Forum Discussion
Report uses dataColors that are not in my custom JSON
- 6 years ago
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"],
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"],