Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

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:

Screenshot_1.png

 

It reverts to default only un touched visuals. 

 

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

 

Thanks

 

1 ACCEPTED SOLUTION

Hi @Anonymous ,

Thanks for your clarification.

Sorry for that I misunderstood your scenario before.

By my research and test again, I'm afraid that this should be a default behaviour for your situation which has been mentioned in the officila docuement.

situations when report theme colors wont stick to your reports

Best  Regards,

Cherry

 

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

7 REPLIES 7
v-piga-msft
Resident Rockstar
Resident 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.

theme.PNG

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

Best  Regards,

Cherry

 

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
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:

Screenshot_2.png

 

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

Screenshot_3.png

 

 

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.

Screenshot_4.png

Is there any option to overwrite all manualy made changes?

 

Thanks for you help.

Best,
Rafal

 

Hi @Anonymous ,

By my tests again with the latest version Power BI Desktop(Store version and Web download version), it seems that the code could work.

theme.png

You could have a test with my attached pbix file with the theme code for my first reply.

If you still have problems, please share a dummy pbix file which can reproduce the issue, so that we can help further investigate on it? You can upload it to OneDrive and post the link here. Do mask sensitive data before uploading.

Best  Regards,

Cherry

 

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

@v-piga-msft 

 

yes if i only switch between themes imported in .json file it works but if i manualy change fonts (like on screen by clicking text size arrrow up to 23 px) and then after this change i try to load my theme or change theme to default, title won't change to settings defined in theme. 

screen.png

 

Case in steps: 

1. someone works on a report and change font settings manualy.

2. I create big theme.json file to overwrite all changes made manualy.

3. After loading my theme, all charts have style defined in theme.json file, except those that were set manualy on step 1

 

I have over 20 tabs in the report so if i would like to unify all charts i would have to change settings chart by chart.

 

Thanks for your help.

 

Hi @Anonymous ,

Thanks for your clarification.

Sorry for that I misunderstood your scenario before.

By my research and test again, I'm afraid that this should be a default behaviour for your situation which has been mentioned in the officila docuement.

situations when report theme colors wont stick to your reports

Best  Regards,

Cherry

 

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

This "feature" is ridiculous. If we have an template, he SHOULD overwrite any manual change. 

Anonymous
Not applicable

Anyone with the same problem or any possible solution?

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.