Forum Discussion

Ferdy07's avatar
Ferdy07
Frequent Visitor
1 year ago
Solved

Implement italic visual subtitles in Power BI Theme JSON file

I need to implement formatting from a style guide to a Power BI theme. I managed to add the most usual stuff like colours, label formatting and largeTitle formatting.

 

However, I can't find how to format subtitles of visuals such that they are italic by default. Does anyone know if that is possible at all and if so, how I can fix this? The subTitle part below is not working. The largeTitle is working fine (including the Bold formatting).

 

 

 

 

{
    "name": "MyCompanyTheme",
    "dataColors": ["#000000", "#00000"],    
    "textClasses": {
        "label": {
            "fontFace": "Segoe UI",            
            "fontSize": 12,
            "color": "#000000"
        },
        "largeTitle": {
            "fontFace": "Segoe UI",
            "fontWeight": "Bold",
            "fontSize": 12,            
            "color": "#001F78"
        },
        "subtitle": {
            "fontFace": "Segoe UI",
            "fontSize": 10,
            "fontStyle": "italic",
            "color": "#000000"
        }     
    },
    "visualStyles": {
    "*": {
        "*": {
            "legend": [
                {
                    "showTitle": false
                }
            ]
        }
    }
}
}

 

 

 

I found an overview of classes here: https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-report-themes. But that list seems not the full list of possible items that can be used.

 

Many thanks in advance!

  • Hi Deku,

    After some research and experimenting with this matter, I came across the following interactive tool: https://tools.powerbi.tips/themes/text. From there it is easy to set up alle the desired elements and download the JSON theme file. From there it is easy to add elements later on. It seems to have more elements that can be customized than the 'customize theme' option in Power BI Desktop.

     

    This way also helped me to fix the subtitels in the way I wanted them. Hopefully others can also benefit from this tool!  Have a nice day.

5 Replies

  • Deku's avatar
    Deku
    Icon for Super User rankSuper User

    You can find the theme schemas here

     

    Most visuals seem to have a shared common card definition, and you can find the subtitles settings there. There is a Boolean flag for italic

    ā€ƒ

    • Ferdy07's avatar
      Ferdy07
      Frequent Visitor

      Hi Deku,

      After some research and experimenting with this matter, I came across the following interactive tool: https://tools.powerbi.tips/themes/text. From there it is easy to set up alle the desired elements and download the JSON theme file. From there it is easy to add elements later on. It seems to have more elements that can be customized than the 'customize theme' option in Power BI Desktop.

       

      This way also helped me to fix the subtitels in the way I wanted them. Hopefully others can also benefit from this tool!  Have a nice day.

  • Ferdy07's avatar
    Ferdy07
    Frequent Visitor

    Hi Deku,

     

    Thank you for your response. I now have a much more clear view on all the properties that I can use, but still did not manage to incorporate the commonCards section in my current json. I will upload a test file soon after some testing.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Ferdy07 ,

    Did the above suggestions help with your scenario? if that is the case, you can consider Kudo or Accept the helpful suggestions to help others who faced similar requirements.

    If these also don't help, please share more detailed information and description to help us clarify your scenario to test.

    How to Get Your Question Answered Quickly 

    Regards,

    Xiaoxin Sheng

  • Anonymous's avatar
    Anonymous
    Not applicable

    HI Ferdy07,

    Any update on this? Did the Deku's suggestion help for your scenario?
    Regards,

    Xiaoxin Sheng