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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
yenngee
Frequent Visitor

text classes code not working

Hi, 

 

I am trying to do a customized theme and was trying out the templates provided on the website here: https://docs.microsoft.com/en-us/power-bi/desktop-report-themes 

However when I tried to use the textclasses code provided, powerbi failed to load the json file. 

 

This is the exact code I used that is found in the website: 

{"name": "Custom Theme",

"textClasses":

{"callout": {"fontSize": 45, "fontFace": "wf_standard-font", "color": "#252423"},

"title": {"fontSize": 12, "fontFace": "wf_standard-font", "color": "#252423"},

"header": {"fontSize": 12, "fontFace": "Segoe UI Semibold", "color": "#252423"},

"label": {"fontSize": 10, "fontFace": "Segoe UI", "color": "#252423"}}}

 

Can someone please help with this? 

 

Thank you! 

3 REPLIES 3
v-juanli-msft
Community Support
Community Support

Hi @yenngee 

Is this problem sloved? 
If it is sloved, could you kindly accept it as a solution to close this case?
If not, please let me know.
 
Best Regards
Maggie
v-juanli-msft
Community Support
Community Support

Hi @yenngee 

I make a test that paste the "text class" code from this site into a text file and save this file as a .json file,

then import the theme from the "import theme", you can see the card data format is changed as the custom theme written.

Capture1.JPGCapture2.JPG

Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi, 

 

That's exactly what I did, but the powerbi did not accept this code at all: 

 

{
"name": "Custom Theme",
"textClasses": {
"callout": {
"fontSize": 45,
"fontFace": "wf_standard-font",
"color": "#252423"
},
"title": {
"fontSize": 12,
"fontFace": "wf_standard-font",
"color": "#252423"
},
"header": {
"fontSize": 12,
"fontFace": "Segoe UI Semibold",
"color": "#252423"
},
"label": {
"fontSize": 10,
"fontFace": "Segoe UI",
"color": "#252423"
}
}
}

 

 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.