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
Anonymous
Not applicable

Rounded outline/border around KPI Card (new) in .json theme

I would like to have rounded corners (4 px) as shown for KPI 3 and KPI 4. I can't get my head around how to implement it.

Ardydardy_0-1728858214236.png


Here is the code I am working on:


"cardVisual": {
"*": {

"outline": [
{
"$id": "default",
"lineColor": {
"solid": {
"color": "#B3B0AD"
}
},
"show": true,
"roundEdge": 4,
"weight": 1,
"transparency": 0
}
],
"padding": [
{
"top": 0,
"left": 0,
"right": 0,
"bottom": 0
}
],
"spacing": [
{
"$id": "default",
"verticalSpacing": 0
}
],
"fillCustom": [
{
"$id": "default",
"fillColor": {
"solid": {
"color": "#FFFFFF"
}
}
}
],
"shape": [
{
"$id": "default",
"roundEdge": 4,
"rectangleRoundedCurve": 4
}
],

"layout": [
{
"orientation": 2,
"customizePadding": false
}
],

"background": [
{
"show": false
}
],

"label": [
{
"$id": "default",
"fontColor": {
"solid": {
"color": "#0B1128"
}
},
"fontSize": 10,
"horizontalAlignment": "center"
}
],
"value": [
{
"$id": "default",
"fontColor": {
"solid": {
"color": "#0B1128"
}
},
"bold": true,
"italic": false,
"underline": false,
"fontSize": 20,
"horizontalAlignment": "center"
}
],
"border": [
{
"show": false
}
]
}
}

 

Thanks in advance


1 ACCEPTED SOLUTION
hnguy71
Super User
Super User

Hi @Anonymous 

 

try this:

 "cardVisual": {
      "*": {
        "shapeCustomRectangle": [
          {
            "$id": "default",
            "tileShape": "rectangleRounded",
            "rectangleRoundedCurveCustomStyle": true,
            "rectangleRoundedCurveLeftTop": 6,
            "rectangleRoundedCurveRightTop": 6,
            "rectangleRoundedCurveLeftBottom": 6,
            "rectangleRoundedCurveRightBottom": 6
          }
        ],
        "outline": [
          {
            "$id": "default",
            "lineColor": {
              "solid": {
                "color": "#B3B0AD"
              }
            },
            "show": true,
            "weight": 1
          }
        ],
        "border": [
          {
            "color": {
              "solid": {
                "color": "#FFFFFF"
              }
            },
            "show": true,
            "radius": 4
          }
        ]
      }
    }
  }

 

The result:

hnguy71_0-1728863239761.png

 



Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!

View solution in original post

5 REPLIES 5
hnguy71
Super User
Super User

Hi @Anonymous 

 

try this:

 "cardVisual": {
      "*": {
        "shapeCustomRectangle": [
          {
            "$id": "default",
            "tileShape": "rectangleRounded",
            "rectangleRoundedCurveCustomStyle": true,
            "rectangleRoundedCurveLeftTop": 6,
            "rectangleRoundedCurveRightTop": 6,
            "rectangleRoundedCurveLeftBottom": 6,
            "rectangleRoundedCurveRightBottom": 6
          }
        ],
        "outline": [
          {
            "$id": "default",
            "lineColor": {
              "solid": {
                "color": "#B3B0AD"
              }
            },
            "show": true,
            "weight": 1
          }
        ],
        "border": [
          {
            "color": {
              "solid": {
                "color": "#FFFFFF"
              }
            },
            "show": true,
            "radius": 4
          }
        ]
      }
    }
  }

 

The result:

hnguy71_0-1728863239761.png

 



Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!

Thanks, seems the "$id": "default"  is necesary for shapeCustomRectangle which is missing from a lot of auto generation tools

Anonymous
Not applicable

YES!!!! THANK YOU so much 🙏
PhilipTreacy
Super User
Super User

@Anonymous 

 

Try

 

 

"border": [{
                "show": true,
                "radius": 4,
                "color": { "solid": { "color": "#CCCCCC" } }
            }],

 

 

regards

 

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Anonymous
Not applicable

This works to make a border on the entire visual, not the cards themselves. But thank you so much.

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!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

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.