Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

JSON for Rounded corners of actionButton

Hi all,

 

I have looked on other posts on this forum but I can't find a solution. 

 

I'm trying to set the Rounded corners property of a button to 15px on my JSON theme. I've tried:

 

1. 

"border": [{
                "show": true,
                "radius": 10,
                "color": { "solid": { "color": "#00FF00" } }
            }]

 but this sets the property of the visual, instead of the button.

2. 

"roundEdge": {
                            "type": "integer",
                            "title": "Round edges"
                          }
As found in the PowerBISchema, but after a successful theme import into Power BI this doesn't seem to affect anything when the button's properties are reset to default. 
 
Below is my JSON for the action button, how can I add a property to control the rounded corners of the button?
 
"actionButton":{"*":
  {
  "border":
    [{
      "show":false
    }],
  "visualHeader":
    [{
      "show":false
    }],
  "background":
    [{
      "show":false
    }],
  "title":
    [{
      "show":false
    }],
  "outline":
    [
      {
        "show":true
      },
      {
        "$id": "default",
        "weight":1
      },
      {
        "$id": "hover",
        "weight":1
      },
      {
        "$id": "selected",
        "weight":1
      }
    ],
  "fill":
    [
      {
        "show":true
      },
      {
        "$id": "default",
        "transparency": 0,
        "fillColor": {"solid":{"color":"#FFFFFF"}}
      },
      {
        "$id": "hover",
        "transparency": 0,
        "fillColor": {"solid":{"color":"#00BED7"}}
      },
      {
        "$id": "selected",
        "transparency": 0,
        "fillColor": {"solid":{"color":"#BE0D30"}}
      }
    ],
  "icon":
    [
      {
      "show":true
      },
      {
        "$id": "default",
        "lineColor":{"solid":{"color":"#212721"}}
      },
      {
        "$id": "hover",
        "lineColor":{"solid":{"color":"#FFFFFF"}}
      },
      {
        "$id": "selected",
        "lineColor":{"solid":{"color":"#FFFFFF"}}
      }
    ],
  "text":
    [
      {
        "show":true
      },
      {
        "$id": "default",
        "fontSize": 14,
        "fontColor":{"solid":{"color":"#212721"}}
      },
      {
        "$id": "hover",
        "fontSize": 14,
        "fontColor":{"solid":{"color":"#FFFFFF"}}
      },
      {
        "$id": "selected",
        "fontSize": 14,
        "fontColor":{"solid":{"color":"#FFFFFF"}}
      }
    ]
  }}
 

Thanks in advance.

  • Hi , Anonymous 

    I test it in my side , you can try to use this:

    {
     "name": "a670051504402230c343",
    
      "visualStyles": {
        "actionButton": {
        
          "*": {
            "background": [
              {
                "show": false
              }
            ],
            "visualHeader": [
              {
                "show": false
              }
            ],
           
            "shape": [
           {
    	   "$id": "default",
              "roundEdge": 34
    	}
          ]
    
          }
        }
      }
    
    }

     

     

     

    Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

     

    Best Regards,

    Aniya Zhang

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

     

     

1 Reply

  • Hi , Anonymous 

    I test it in my side , you can try to use this:

    {
     "name": "a670051504402230c343",
    
      "visualStyles": {
        "actionButton": {
        
          "*": {
            "background": [
              {
                "show": false
              }
            ],
            "visualHeader": [
              {
                "show": false
              }
            ],
           
            "shape": [
           {
    	   "$id": "default",
              "roundEdge": 34
    	}
          ]
    
          }
        }
      }
    
    }

     

     

     

    Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

     

    Best Regards,

    Aniya Zhang

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