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

Get Fabric Certified for FREE during AI Skills Fest. This week only. Secure your voucher now.

Reply
AL_1234
New Member

Custom JSON theme

Hello,

 

I'm developing a custom theme for my pbi reports. Unfortunatelly, I can't find clear information what I should write on which level in the file. Below is example of my JSOn file. Could you please explain when I'm supposed to do changes inside the first * and when inside the second *?

 "card": {
            "*": {
                "*":[
                {    
                }],
                "labels":[{
                    "color":{
                        "solid":{
                            "color": "#4C4D4F"
                        }
                    },
                    "fontSize": 28,
                    "bold":true
                }],
                "categoryLabels": [
                    {
                        "fontSize": 13,
                        "bold": true,
                        "fontColor": {
                            "solid": {
                                "color": "#888888"
                            }
                        }
                    }
                ],
                "label": [
                    {
                        "$id": "default",
                        "fontSize": 12,
                        "fontColor": {
                            "solid": {
                                "color": "#888888"
                            }
                        },
                        "position": "belowValue"
                    }
                ]
            }
        },
"barChart": {
            "*": {
                "*":[
                    {
                    "showAxisTitle": false,
                    "fillTransparency": 30
                    }
                ],
                "labels": [{
                    "show": true,
                    "color": { "solid": { "color": "#FFFFFF"}},
                    "labelDisplayUnits": 0,
                    "fontSize": 11,
                    "enableBackground": true,
                    "backgroundColor": { "solid": { "color": "#888888"}},
                    "backgroundTransparency": 50,
                    "labelPosition": "InsideCenter"
                }],
                "background": [
                    {
                        "show": true,
                        "color": {
                            "solid": {
                                "color": "#FFFFFF"
                            }
                        }
                    }
                ],
                "legend": [
                    {
                        "show": true,
                        "position": "BottomRight",
                        "showTitle": false
                    }
                ]
            }
        }
 
Thank you for advance for any help regarding this!
3 REPLIES 3
blorbert
Frequent Visitor

After some trial and error and going through a few forums I found a solution to updating some of the json settings for the new card visual.  Included is also the use of shapeCustomRectangle to get the default shape you want.

"cardVisual": {
      "*": {
        "padding": [
          {
            "top": 0,
            "left": 0,
            "right": 0,
            "bottom": 0
          }
        ],
        "value": [
          {
            "fontSize": 22,
            "fontFace": "Arial",
            "fontFamily": "Arial",
            "fontColor":{
              "solid": {
                "color": "#000000"
              }
            },
            "horizontalAlignment": "center",
            "$id": "default"
          }
        ],
        "label": [
          {
            "fontSize": 10,
            "fontFace": "Arial",
            "fontFamily": "Arial",
            "fontColor":{
              "solid": {
                "color": "#103F8C"
              }
            },            
            "horizontalAlignment": "center",
            "position": "belowValue",
            "$id": "default"
          }
        ],
        "shapeCustomRectangle": [{
                    "$id": "default",
                    "tileShape": "rectangleRounded",
                    "rectangleRoundedCurve": 20
                }],
        "fillCustom": [
          {
            "show": true,
            "fillColor":{
              "solid": {
                "color": "#F1F3F5"
              }
            },
            "$id": "default"
          }
        ]
      }
    }
tharunkumarRTK
Super User
Super User

@AL_1234 

Every time Microsoft releases a new power bi desktop version, a new version theme json will get made available to everyone. The new json version will contain the properties/features/formatting options that are newly added.
https://github.com/microsoft/powerbi-desktop-samples/tree/main/Report%20Theme%20JSON%20Schema


Download the appropriate schema file to your workstation, then create a blank JSON file alongside the downloaded file. 

1. '*' - represents wildcard-style targeting mechanism. 

 

I understand that it might be a bit difficult to complete this json theme as there is no docuementation available. I would suggest you to use any third party tools using which you can easily generate a json 

For example you can use the embedded power bi report on this page to know about all the properties and their json labels for each visual 

https://curbal.com/product/json-theme-bundle-by-curbal

 

I hope this helps

 

 

 

 

 

Connect on LinkedIn

 

 

 








Did I answer your question? Mark my post as a solution!
If I helped you, click on the Thumbs Up to give Kudos.

Proud to be a Super User!


PBI_SuperUser_Rank@2x.png
AL_1234
New Member

Also, I can't find a way to change the shape of cards for cardVisual.

AL_1234_0-1751613636185.png

I have tied using 

"shapeCustomRectangle" but it wont do any changes.

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors