Forum Discussion
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
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 }] } } } }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
2 Replies
- v-lid-msftCommunity 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 }] } } } }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- AnonymousNot 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