Forum Discussion

abdul2134's avatar
abdul2134
Frequent Visitor
8 years ago
Solved

Json Theme

Hi,

 

i have been trying to work out a way to create a theme witht he added help of having a background for the card visual.

I was wondering if there is anyway of doing this is. if so it would greatly appreciated.

 

thanks

  • Anonymous's avatar
    Anonymous
    8 years ago

    abdul2134,

    There is an example for you.

    {
        "name": "MYTHEME",
        "background": "#FFFFFF",
        "foreground": "#000000",
        "tableAccent": "#5073b9",
        "dataColors": [
            "#003366",
            "#5073b9",
            "#82A1BD",
            "#A8C5E0",
            "#A4D3E3",
            "#366996",
            "#304E64",
            "#004576",
            "#666666",
            "#000000"
        ],
        "visualStyles": {
            "card": {
                "*": {
                    "title":  [{
    
                        "show": true,
    
                        "fontColor": { "solid": { "color": "#F17925" } },
    
                        "background": { "solid": { "color": "#FFFFFF" } },
    
                        "alignment": "center",
    
                        "fontSize": 11,
    
                        "fontFamily": "Arial"
    
                    }],
                    "background": [{
    
                        "show": true,
    
                        "color": { "solid": { "color": "#777777" } },
    
                        "transparency": 50
    
                    }],
                    "lockAspect": [{
    
                        "show": true
    
                    }],
                    "border": [{
    
                        "show": true,
    
                        "color": { "solid": { "color": "#F17925" } }
    
                    }]
                }
            }
    }
    }


    Reference:
    https://powerbi.microsoft.com/en-us/blog/power-bi-desktop-july-2018-feature-summary/#theme


    Regards,
    Lydia

3 Replies