Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello,
I need to add a font in the theme to be available in the Text property of any shape object (the one highlighted in the image below)
I can access the rectangle object via 'shape' visual object, but I don't know what are the other properties to get to add a font.
I tried the following code, but it doesn't work:
"visualStyles" : {
"shape" : {
"*": {
"text": [{"fontFamily": "Ogg Regular"}]
}
}
}
It seems that line
"text": [{"fontFamily": "Ogg Regular"}]
isn't correct, and here is where I need help.
I couldn't see in the documentation any cardName property that looks like the one I need.
Do you know how can I reach this property and add a font?
Thanks
@Anonymous , check if this solution can help
https://community.powerbi.com/t5/Desktop/Themes-For-Shapes/m-p/196835
Hello, I couldn't make use of the solution that appears in the link. I need to add a new font to the Text section of a shape object.
The question is what card property to I have to access in the .json in order to get to the Text section and add the font, if exists.
Hi, I (finally) found a solution for this issue.
You need to enter a "$id": tag in the text parameter, such as follows:
"visualStyles": {
"visualStyles": {
"shape": {
"*": {
"text": [
{
"$id": "default",
"fontFamily": "Arial Black",
"fontSize": 16,
"show": true
}
]
}
}
}
I have no clue why it is so, but it works as of today