Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi There,
with the may 2021 release of PBIRS we also got the new shapes feature with desktop which was released to the regular desktop in april 2021 (https://powerbi.microsoft.com/de-de/blog/power-bi-april-2021-feature-summary/#post-14480-_Toc6868909...).
Unfortunately after converting existing shapes my settings in my custom json don't work properly anymore.
Is there any updated documentation to this?
This (https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-report-themes#report-theme-json-fil...) does not help at all...
Cheers
Axel
Hi Axel Et al,
The element name for 'new' shapes (new from April 2021) is now just "shape" instead of "basicShape". Curiously, it also shares a similar structure with actionButton (you have to declare the default state for the shape).
I found a recently updated Git Repo which has some useful info these new shapes:
https://github.com/deldersveld/PowerBI-ThemeTemplates/blob/master/Shape.json
Please see the below json, hope this helps!
{
"name": "ShapeFillAndOutline",
"visualStyles": {
"shape": {
"*": {
"background": [
{
"show": false
}
],
"fill": [
{
"show": true
},
{
"$id": "default",
"transparency": 0,
"fillColor": {
"solid": {
"color": "#FFFFFF"
}
}
},
{
"$id": "hover",
"transparency": 0,
"fillColor": {
"solid": {
"color": "#000000"
}
}
}
],
"outline": [
{
"show": true
},
{
"$id": "default",
"transparency": 0,
"lineColor": {
"solid": {
"color": "#000000"
}
}
}
],
"visualHeader": [
{
"show": false
}
]
}
}
}
}
Hello Joshua,
Thank you for your answer. In fact, this helped me apply the settings to the shapes as I wanted.
However, I would like to apply different settings for different shaps (lines, rectangles, oval, etc.).
Do you know if there is any way to define it? Our is there no possibility to select the type of shape that I want to apply settings?
Regards
I had the same problem and created an issue here. Feel free to upvote it: (1) Fix shape formatting in theme json - Microsoft Power BI Community
Hi Dedmon,
this works after converting the shape. But that's not the point. This is my current JSON (partly):
"basicShape": {
"*": {
"background": [{
"show": false,
"color": { "solid": { "color": "#ffffff" } },
"transparency": 20
}],
"line": [{
"lineColor": { "solid": { "color": "#323232"}},
"transparency": 0,
"weight": 3,
"roundEdge": 0
}],
"fill": [{
"show": false,
"fillColor": { "solid": { "color": "#ffffff"}},
"transparency": 100
}],
"title": [{
"show": false,
"fontColor": { "solid": { "color": "#323232" } },
"background": { "solid": { "color": "#ffffff" } },
"alignment": "Left",
"fontSize": 11,
"fontFamily": "Segoe UI Light"
}],
"rotation": [{
"angle": 0
}],
"visualHeader": [{
"show": false
}],
"border":[{
"show":true,
"color": { "solid": { "color":"#CCCCCC" } },
"radius": 5
}]
}
}
Now the code from above does not have any affect. I guess with the new shapes something else needs to change...
Cheers
Axel
Hi @Anonymous ,
It seems that something wrong with the custom shape by json file. I tried it also in the latest verison of power bi desktop cloud version, it didn't work also.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
Hi Dedmon,
my version is an extended version of this:
https://github.com/deldersveld/PowerBI-ThemeTemplates/blob/master/Shape.json
{
"name": "ShapeTemplate",
"visualStyles": {
"basicShape": {
"*": {
"line": [{
"lineColor": { "solid": { "color": "#01B8AA"}},
"transparency": 0,
"weight": 3,
"roundEdge": 0
}],
"fill": [{
"show": true,
"fillColor": { "solid": { "color": "#DDDDDD"}},
"transparency": 0
}],
"rotation": [{
"angle": 0
}],
"visualHeader": [{
"show": false
}]
}
}
}
}
Of course, my code was only a part of a much larger JSON file... I assumed you would anticipate that. Sorry.
Anyway: If we focus on the fill attribute the new shapes do not recognize the setting given in the JSON file. So my question is: were there any fundamental changes to how to setup the JSON file regarding the new shapes and if so, where is the documentation?
Thanks in advance
Axel
Hi @Anonymous ,
Yes, I test it with the code provide in github yesterday, it didn't work even in the latest version of power bi desktop cloud version. Unfortunately, I didn't find any document that talking about setting up json for the new shape. I suggest you raise a support ticket for it. Go to https://support.powerbi.com. Scroll down and click "CREATE SUPPORT TICKET".
Best Regards,
Dedmon Dai
Hi @Anonymous ,
Would you please try to change the color for the shapes manually?
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
5 | |
4 | |
3 | |
2 | |
2 |