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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
jacksonwydra
New Member

Set default size of visuals in custom theme file

I would like to set the width and height of all card visuals to be a specific number so I dont have to resize them every time I make a new one. I have tried setting it in my custom theme file (.json) but can't seem to select the correct property. After scrolling through the documentation I could not find a width or height property in the general card.

1 ACCEPTED SOLUTION
Mike_Carlo
Kudo Kingpin
Kudo Kingpin

The width and height of visuals are not definable via the json schema. We would call those properties under the genaral setting something like the visual container properties. While more recently the background are now options you can expose the width and height are not adjustable.

When I need to make cards of a certain size in one report. I will make a blank page, put the card on the page. Then adjust the properties of the card to the correct width and height. Finally I will use CTRL-C (copy) and CTRL-V (paste) to place the property sized card onto other pages. This works well when you are working within just one report. Define the default settings once and then reuse it for the remainder of the report.

This does not solve the fact that you have to set up the default size of the card on every new report. This can be solved by making a report with only a card visual. Adjust the setting of the card to your desired size. Then save the entire file as a PBIT, which is a template file. Then when you want to create a new report you will be able to open the PBIT file and automatically start with a card of the proper size.
Mike Carlo ( https://powerbi.tips )
mike@PowerBI.Tips

View solution in original post

4 REPLIES 4
Mike_Carlo
Kudo Kingpin
Kudo Kingpin

The width and height of visuals are not definable via the json schema. We would call those properties under the genaral setting something like the visual container properties. While more recently the background are now options you can expose the width and height are not adjustable.

When I need to make cards of a certain size in one report. I will make a blank page, put the card on the page. Then adjust the properties of the card to the correct width and height. Finally I will use CTRL-C (copy) and CTRL-V (paste) to place the property sized card onto other pages. This works well when you are working within just one report. Define the default settings once and then reuse it for the remainder of the report.

This does not solve the fact that you have to set up the default size of the card on every new report. This can be solved by making a report with only a card visual. Adjust the setting of the card to your desired size. Then save the entire file as a PBIT, which is a template file. Then when you want to create a new report you will be able to open the PBIT file and automatically start with a card of the proper size.
Mike Carlo ( https://powerbi.tips )
mike@PowerBI.Tips

is it still like this? not enabled in JSON?

it's absurd in my opinion. 

Thank you!

Greg_Deckler
Super User
Super User

I'm not sure that's possible, but @Mike_Carlo might know, he has done some great work with themes.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

Find out what's new and trending in the Fabric community.

Top Kudoed Authors