Forum Discussion

thod's avatar
thod
Icon for Helper I rankHelper I
3 years ago
Solved

Updating theme file

Hi,
I am struggling with updating a Power BI theme json file, as I want to make the font size on the slicer header to default "10" - please note it is the slicer header and not the title. Can anyone help me with that. The code works fine for the title, but not the slicer header.
I have the following code in the json file for the slicer:

"slicer": {
            "*": {
                "title": [
                    {
                        "show": false,
                        "titleWrap": true,
                        "fontColor": { "solid": { "color": "#FFFFFF" } },
                        "alignment": "Left",
                        "fontSize": "10" -- works fine
                    }
                ],                
                "background": [
                    {
                        "show": true,
                        "color": { "solid": { "color": "#5692B5" } },
                        "transparency": 0                        
                    }
                ],
                "header": [
                  {
                        "show": true,
                        "fontColor": { "solid": { "color": "#FFFFFF" } },
                        "fontSize": "10", -- does not work
                        "transparency": 0        
                  }
                ],
                "selection": [
                    {
                        "singleSelect": false,
                        "selectAllCheckboxEnabled": true
                    }
                ],
                "items": [
                    {
                        "background": { "solid": { "color": "#5692B5" } },
                        "fontColor": { "solid": { "color": "#FFFFFF" } }
                    }
                ],
                "dropShadow": [
                    {
                        "show": true,
                        "color": { "solid": { "color": "#6684A1" } },
                        "position": "Outer"
                    }
                ],
                "border": [
                    {
                        "show": true,
                        "color": { "solid": { "color": "#FFFFFF" } },
                        "radius": 3
                    }
                ]
            }
        }
 
Br.,
Thomas
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi thod ,

     

    According to the document, the JSON field related to the slicer header is title, please modify and try.

     

    Best Regards,

    Neeko Tang

    If this post helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

4 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi thod ,

     

    Please try changing the json code to:

     "header": [
                      {
                            "show": true,
                            "fontColor": { "solid": { "color": "#FFFFFF" } },
                            "textsize": "10", 
                            "transparency": 0        
                      }

    You can refer to the following posts that may be helpful to you:

    JSON theme for visual "slicer" with new options in PBI Desktop Version 2022

    JSON File Help

    Use report themes in Power BI Desktop - Power BI | Microsoft Learn

     

    Best Regards,

    Neeko Tang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. 

     

    • thod's avatar
      thod
      Icon for Helper I rankHelper I

      Hi Neeko,

       

      Unfortunately that didn't help. The slicer header still show the default fontsize at 14 and not 10.

      I have both tried with  "textsize": "10" and "textSize": "10", but it didn't work.

       

      Do you have other suggestions?

       

      Br.,

      Thomas

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi thod ,

         

        According to the document, the JSON field related to the slicer header is title, please modify and try.

         

        Best Regards,

        Neeko Tang

        If this post helps, then please consider Accept it as the solution  to help the other members find it more quickly.