Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

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 li...
  • santiagomur's avatar
    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"],