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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Syndicate_Admin
Administrator
Administrator

json Dropdown and basicShape functions fail

Good

I'm defining a custom theme with json and I'm having trouble with some of the features.

The code I'm using is the following (I've trimmed it a bit by removing the color section):

{"name":"Look&feel",
"visualStyles":{
"*":{"*":{
"general":[{"keepLayerOrder":true}],
"valueAxis":[{"show":false,"showAxisTitle":false,
"labelColor":{"solid":{"color":{"expr":{"ThemeDataColor":{"ColorId":2,"Percent":0}}}}},"fontSize":"9","fontFamily":"Segoe UI",
"titleColor":{"solid":{"color":{"expr":{"ThemeDataColor":{"ColorId":2,"Percent":0}}}}},"titleFontSize":"12","titleFontFamily":"DIN",
"gridlineShow":false}],
"categoryAxis":[{"show":true,"showAxisTitle":false,
"labelColor":{"solid":{"color":{"expr":{"ThemeDataColor":{"ColorId":2,"Percent":0}}}}},"fontSize":"9","fontFamily":"Segoe UI",
"titleColor":{"solid":{"color":{"expr":{"ThemeDataColor":{"ColorId":2,"Percent":0}}}}},"titleFontSize":"12","titleFontFamily":"DIN"}],
"labels":[{"show":true}],
"title":[{"show":true,
"fontColor":{"solid":{"color":{"expr":{"ThemeDataColor":{"ColorId":2," Percent":0}}}}},
"fontSize":"14",
"fontFamily":"DIN"}],
"background":[{"show":true,"color":{"solid":{"color":{"expr":{"ThemeDataColor":{"ColorId":0,"Percent":0}}}}}}],
"border":[{"show":true,"color":{"solid":{"color":{"expr":{"ThemeDataColor":{"ColorId":0,"Percent":0}}}}},"radius":4}],
"dropShadow":[{"show":true,"color":{"solid":{"color":{"expr":{"ThemeDataColor":{"ColorId":1,"Percent":0}}}}},"preset":"Custom","shadowSpread":1," shadowBlur":2.0,"angle":90,"shadowDistance":0,"transparency":75}],
"columnHeaders":[{"fontColor":{"solid":{"color":"#1267A2"}}},{"bold":true}],
"grid":[{"outlineColor":{"solid":{"color":{"expr":{"ThemeDataColor":{"ColorId":2,"Percent":0}}}}}}]}},
"page":{"*":{
"outspace":[{"color":{"solid":{"color":"#EDEDED"}}}],
"background":[{"color":{"solid":{"color":"#F6F8FA"}},"transparency":0}]}},
"slicer": {"*": {
" border":[{"show":false}],
"dropShadow":[{"show":false}],
"general": [{"orientation": "vertical"}],
"data":[{"mode":"Dropdown"}],
"selection": [{"selectAllCheckboxEnabled": true,"multiSelect": false,"singleSelect": false}],
"header": [{"show": true,
"fontColor": { "solid": { "color": {"expr":{"ThemeDataColor":{"ColorId":2,"Percent":0}}}}},
"textSize": 11,
"fontFamily": "DIN"}],
"items": [{
"fontColor": { "solid": { "color": {"expr":{"ThemeDataColor":{"ColorId":2,"Percent":0}}}}},
"background": { "solid": { "color": "#F6F8FA"}},
"textSize": 10}],
"slider": [{
"color": {"solid": { "color": {"expr":{"ThemeDataColor":{"ColorId":2,"Percent":0}}}}}}]}},
"image": {"*": {
"border":[{"show":false}],
"dropShadow":[{"show":false}]}},
"textbox": {"*": {
"border":[{"show":false}],
"dropShadow":[{"show":false}]}},
" basicShape": {"*": {
"border":[{"show":false}],
"dropShadow":[{"show":false}]}},
"actionButton": {"*": {
"border":[{"show":false}],
"dropShadow":[{"show":false}]}}
}}

As you can see, in the first section, I have a set of conditions applied to all visualizations and then I define exceptions. But I have two problems:

3 REPLIES 3
joshuakellyrha
Frequent Visitor

For "basicShape", the element name has changed to just "shape". The structure is slightly different too; I found this out through a lot of trial and error.

 

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

 

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
          }
        ]
      }
    }
  }
}

 

 

v-chenwuz-msft
Community Support
Community Support

Hi @Syndicate_Admin ,

 

Maybe you can try it like this:

vchenwuzmsft_0-1658460451850.png

A space before the string, please remove it and try again.

vchenwuzmsft_1-1658460580756.png

 

Best Regards

Community Support Team _ chenwu zhu

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

 

Thank you very much for your reply, but I am afraid it has not been soucionado.

I have applied the change in "slicer" and it still does not work.

"slicer": {"*": {
"title":[{"show":false}],
"border":[{"show":false}],
"dropShadow":[{"show":false}],
"general": [{"orientation": "vertical"}],
"data":[{"mode":[{"value":"Dropdown", "displayName":"Dropdown"}]}],
"selection": [{"selectAllCheckboxEnabled": true,"multiSelect": false,"singleSelect": false}],
"header": [{"show": true,
"fontColor": { "solid": { "color": {"expr":{"ThemeDataColor":{"ColorId":2,"Percent":0}}}}} ,
"textSize": 11}],
"items": [{
"fontColor": { "solid": { "color": {"expr":{"ThemeDataColor":{"ColorId":2,"Percent":0}}}}},
"background": { "solid": { "color": "#F6F8FA"}},
"textSize": 10}],
"slider": [{
"color": {"solid": { "color": {"expr":{"ThemeDataColor":{"ColorId":2,"Percent":0}}}}}}]}},

On the other hand, about what you say about "basicShape" I have to say that in my code I do not have space before the string, you can see it in the code that I have uploaded in the description of the message.

"basicShape": {"*": {
"border":[{"show":false}],
"dropShadow":[{"show":false}]}},

Any more ideas?

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.