Forum Discussion
New Shapes in PBI - How to Setup JSON?
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