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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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

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

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.


@ 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!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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