Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello everyone 🙂
I have created a custon theme for my dashboard with a JSON file, where I specify the font family I want to use:
"visualStyles":{
"*": {
"*": {
"*": [{
"fontFamily": "HP Simplified",
"fontSize":11
}]
}
}
}
This works in all visualizations except on the button's text. I know I could change the font selecting the button and going to "Visualizations -> Button Text -> Font family", but the font I want to use is not available in the options.
I would really appreciate any ideas. Thank you!
Hey. I know this is old, but I wanted to provide the solution as this was the only thread I found while googling.
You have to specify the JSON class name "lightLabel", as this changes button text fonts. Here is a working example:
{
"name": "CustomTheme",
"textClasses": {
"lightLabel": {
"fontSize": 45,
"fontFace": "Harlow Solid",
"color": "#252423"
}
}
}
You can read more and find examples here: https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-report-themes#report-theme-json-fil...
It works for me, thx!
Thanks, good timing actually. Are you sure this works...? I've just tested and nothing is changing.
Trying to change the Text from buttons on default state, just to be clear.
regards!
Just tried again, and it works for me. Copy-paste the script into a notepad, and save as filename.json. From report view go to View->Theme dropdown->browse for themes->select your file. Here is with HP Simplified, as irenereche was looking for. Arial on the left button for comparison.
Also, If I can borrow a little bit more of your knowledge 🙂, would you know how to do change a gauge callout value text to bold? I managed to change the font, but I can't change it to bold.
Yeah, now that I tested your script alone it does work, thanks.
I was trying to add that to my existing Theme, which was basically applying the Custom Font to the rest of report :
Then it didn't work. Maybe I've done something wrong, don't know much about editing Json files.
Anyway, sorted now.
Thanks again!
Happy to help. I recommend checking out the table under the "Setting formatted text defaults" chapter in the documentation.
Other text classes, considered secondary classes, automatically derive their properties from their associated primary classes. Often, a secondary class selects a lighter shade of text color, or a percentage large or smaller text size compared to the primary class.
It looks like it is easy to accidentally overwrite one theme when using another, higher level theme.
Not sure about Gauge callout value. It says something about Gauge callout value color in the table, but not sure if that includes bold-formatting
Hi @Anonymous,
According to desktop-report-themes, the button text isn't supported yet while the button title is supported. I would suggest you vote up this idea.
Best Regards,
Thank you! 🙂 I have voted up the idea.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
101 | |
86 | |
64 |