Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago

Setting JSON theme data colours for every field rather than just using default

Hi,

 

I have written a JSON theme to just import my data colours, which it does.

{
  "name": "DocDataColours",
  "dataColors": [
    "#7C2A6E",
    "#C45911",
    "#6E2714",
    "#1A688C",
    "#0AC9A7",
    "#CDA2EE",
    "#142E6E",
    "#BE0272",
    "#5B6E14",
    "#8C1A2F",
    "#2A7C61",
    "#E0C13D",
    "#3DAEE0",
    "#003300",
    "#11A502",
    "#E03D5D"
  ]
}

But I experience problems when using the ClusteredBarChart Visual for example. It decides that I want all the Data Colours to only be the first one in my theme (#7C2A6E), whereas I actually want them all. I would attach pictures to show you what I meant, but this editor isn't playing ball.

 

How can I incorporate this into my code?

 

Thanks

3 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi v-chuncz-msft,

      I can now show you the photos of what I need. So when I upload my theme, this is what my data colours settings display.

      What I want is to be able for the theme to set the "show all" data fields to be the different colours in my theme, rather than the default. Like I have done manually in the below picture.

       

      I have tried the Report Theme Generator V3 with no luck as how to resolve this. The only way I have found is to manually set the colours, but this is not sustainable going forward.

      • Anonymous's avatar
        Anonymous
        Not applicable

        Any update on this? The report theme generator didn't work.

         

        I'm not sure if power bi theme generation actually this functionality.