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

Custom Themes

Hi everyone,

 

I've tried searching for my answer regarding custom themes, but have finally resulted in posting my question to the forum - my apologies if this has been covered.

 

I've trying to create a custom 'corporate' theme for the organisation I work for.

 

My question is regarding the visualisation title. So far I have managed to format the title (eg, font colour and background) at a total report level in the 'visual sytles' section of my JSON code, using the notes from the July 2018 release https://powerbi.microsoft.com/en-us/blog/power-bi-desktop-july-2018-feature-summary/#theme

 

However, I want to be able to have different title formatting depending on the visual, e.g, cards green and cluastered bar charts grey.

 

Does anyone know if this is possible? From what I have learnt, it is possible to change the formatting of the title cards at a report level but not possible change at an individual level - can anyone clarify and perhaps link me to an example?

 

Many thanks,

Martyn

1 ACCEPTED SOLUTION
v-lid-msft
Community Support
Community Support

Hi @Anonymous ,

 

You can add the visual setting inside “visualStyles” for each visual according to this docs:

https://docs.microsoft.com/en-us/power-bi/desktop-report-themes#report-theme-json-file-format

 

{
"name": "TestCusotmTheam",
"visualStyles": {
    "clusteredBarChart": {
        "*": {
            "title": [{
                "show": true,
                "fontColor": { "solid": { "color": "#BEBEBE" } },
                "alignment": "center",
                "fontSize": 11,
                "fontFamily": "Arial"
            }]
        }
    },
    "card": {
        "*": {
            "title": [{
                "show": true,
                "fontColor": { "solid": { "color": "#00FF00" } },
                "alignment": "center",
                "fontSize": 11,
                "fontFamily": "Arial"
            }]
        }
    },
    "page": {
            "*": {
                "background": [{
                "color": { "solid": { "color": "#FFFFFF" } },
                "transparency": 25
            }],
            "outspace": [{
                "color": { "solid": { "color": "#004753" } },
                "transparency": 0
            }]
        }
    }
    }
}

Custom-Themes-1.png

 

BTW, json as attached.

 

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

Community Support Team _ Dong Li
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

2 REPLIES 2
v-lid-msft
Community Support
Community Support

Hi @Anonymous ,

 

You can add the visual setting inside “visualStyles” for each visual according to this docs:

https://docs.microsoft.com/en-us/power-bi/desktop-report-themes#report-theme-json-file-format

 

{
"name": "TestCusotmTheam",
"visualStyles": {
    "clusteredBarChart": {
        "*": {
            "title": [{
                "show": true,
                "fontColor": { "solid": { "color": "#BEBEBE" } },
                "alignment": "center",
                "fontSize": 11,
                "fontFamily": "Arial"
            }]
        }
    },
    "card": {
        "*": {
            "title": [{
                "show": true,
                "fontColor": { "solid": { "color": "#00FF00" } },
                "alignment": "center",
                "fontSize": 11,
                "fontFamily": "Arial"
            }]
        }
    },
    "page": {
            "*": {
                "background": [{
                "color": { "solid": { "color": "#FFFFFF" } },
                "transparency": 25
            }],
            "outspace": [{
                "color": { "solid": { "color": "#004753" } },
                "transparency": 0
            }]
        }
    }
    }
}

Custom-Themes-1.png

 

BTW, json as attached.

 

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

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

Thank you very much!

 

I used snippets from your example to create what I needed, which was a title with white text and a grey background, and it worked a treat. Your examples worked perfectly.

 

This is what I used.

 

{
"name": "TestTheme",
"visualStyles": {
    "clusteredBarChart": {
        "*": {
            "title": 	[{
                "show": true,
                "fontColor": { "solid": { "color": "#ffffff" } },
                "alignment": "center",
                "fontSize": 9,
                "fontFamily": "Segoe UI",
		"background": { "solid": { "color": "#666666" } }
            }]
        }
    }
}
}

Many thanks,

Martyn

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.