0 votes
1 view
in BI by (9.4k points)

I want to create a theme in Power Bi by using google fonts and the theme is a JSON file

The font I want to use is  Rubik, and for that is JSON code

"background": "#ffffff",
"foreground": "#000000",
"tableAccent": "#FF637D",
"dataColors": [ "#003E51", "#00BFD6", "#BCBCBB", "#8AD4EB", "#575756", "#C8D308" ],    
"visualStyles": {
        "*": {
            "*": {
                "*": [
                    {
                        "fontSize": 12,
                        "fontFamily": "DIN",
                        "color": { "solid": {} }
                    }
                ],
                "general": [ { "responsive": true } ]
            }
        },

The outcome that I am expecting is

@import (less) url('https://fonts.googleapis.com/css?family=Lato'); 

Then I can change "fontFamily" to "Rubik" like:

"fontFamily" : "Rubik", 

1 Answer

0 votes
by (19.3k points)

Use the following formula:

 {
        "name": "my theme",
        "dataColors": ["#568410", "#3A6108", "#70A322", "#915203", "#D79A12", "#bb7711", "#114400", "#aacc66"],
        "background":"#FFFFFF",
        "foreground": "#3A6108",
        "tableAccent": "#568410",
        "visualStyles":{
            "*": {
                "*": {
                    "*":  [{
                            "fontFamily": "Roboto Condensed"
                        }]
                }
            }
        }
    }
 Check out our Power BI Developer blog and be one!

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
asked Dec 22, 2020 in BI by Chris (9.4k points)
0 votes
1 answer
0 votes
1 answer
asked Dec 31, 2020 in BI by Chris (9.4k points)
Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...