Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Custome Theme doesnt overwrite changes made in the report

Hi, 

 

i preapared simple global rule to change fonts on all charts. 

{
    "name": "PowerBI Theme",
    "visualStyles": {
        "*": {
            "*": {
                "*": [
                    {
                        "fontSize": 10,
                        "fontFamily": "Arial"
                    }
                ],
                "legend": [
                    {
                        "showTitle": true,
                        "fontSize": 15
                    }
                ]
            }
      }
    }
}

 

Unfortunately when i import it into PowerBI Desktop it changes font sizes only on charts where they were set as default. 

 

Even if i click:

 

It reverts to default only un touched visuals. 

 

Could anyone help me with importing .json template to overwrite ALL settings? 

 

Thanks

 

7 Replies

  • v-piga-msft's avatar
    v-piga-msft
    Icon for Resident Rockstar rankResident Rockstar

    Hi Anonymous ,

    By my tests with the latest version of Power BI Desktop 2.67.5404.801, it seems that your code could change the font setting for the visuals in Power BI.

    I have a lilttle change for your code which may be more clearly.

     

    {
        "name": "PowerBI Theme",
        "visualStyles": {
            "*": {
                "*": {
                    "*": [
                        {
                            "fontSize": 20,
                            "fontFamily": "DIN"
                        }
                    ],
                    "legend": [
                        {
                            "showTitle": true,
                            "fontSize": 5
                        }
                    ]
                }
          }
        }
    }

    Here is the test output.

    If it is convenient, could you share your sceenshots to describe your scenario in more details.

    Best  Regards,

    Cherry

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi v-piga-msft ,

      thanks for your prompt reply. 

       

      I have updated PowerBI and I am using version 2.67.5404.801 64-bit now and still have the same problem. 

      Here is step by step explenation with screenshots: 

      1. I change manualy title size of chart in PowerBI:

       

      2. Then after changing one chart title i import theme in .json file (the one you specified)

       

       

      3. After importing theme, visuals that were untouched when importing theme are changed and one that was changed manualy is not overwritten by theme rules.

      Is there any option to overwrite all manualy made changes?

       

      Thanks for you help.

      Best,
      Rafal

       

      • Anonymous's avatar
        Anonymous
        Not applicable

        Anyone with the same problem or any possible solution?