Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in BI by (11.1k 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 (22.5k points)
edited by

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
asked Feb 15, 2021 in BI by Chris (11.1k points)
0 votes
1 answer
asked Dec 22, 2020 in BI by Chris (11.1k points)
0 votes
1 answer
asked Jan 3, 2021 in BI by Chris (11.1k points)
0 votes
1 answer
asked Dec 31, 2020 in BI by Chris (11.1k points)
0 votes
1 answer

Browse Categories

...