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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
chrisha
Frequent Visitor

Power BI adds margin around images

I've tried to create a traffic light indicator in a report; I'm unable to use custom visuals so I thought I'd make it with a png with a transparent center, and just set the background color dynamically according to rules. The image I created and used is below.

 

Trafikklys_enkelt.png

 

However, when I add this to the report and set the background color, Power BI adds a padding to the image which also gets the background color applied, resulting in a "bleed" around the image as below.

 

chrisha_0-1618952485875.png

 

Is this as-designed, or is this a bug? Regardless of which; is there a workaround for this?

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @chrisha 

There is some transparent space around the black area in this image, so it displays "bleed" outside. 

 

As a workaround, you can insert a round or a square shape. Put the image on the top of the shape. Hold on Shift key and select the image and the shape at the same time, then right-click your mouse and group them. At last, format the shape's background color dynamically according to rules.

 

Make sure that the image is on a higher layer than the shape.

042305.jpg

Regards,
Community Support Team _ Jing
If this post helps, please Accept it as the solution to help other members find it.

View solution in original post

5 REPLIES 5
bgriff135
Frequent Visitor

I have the same issue but with a client logo image. When I insert the image, a thin transparent border is added. This prevents me from completely aligning the logo with the edge of my report page (they'd like it to appear 'cut off' at the edge of the report). Is there a way to prevent this thin border from being added?

 

In this image, I'd like the colors to touch the outer edge of the image box, so when dragged to the report page edge it appears continuous. I cannot just add a background image as described above because of the black and blue colors that need to extend.

bgriff135_0-1657124460631.png

 

Hi @bgriff135 

 

Try inserting a blank button and using the logo image to fill the button. Adjust the button's height and width to leave no space around the logo. 

vjingzhang_1-1657617903035.png

 

Regards,
Jing

Hi Jing, this worked perfectly! Thank you for the creative solution.

v-jingzhang
Community Support
Community Support

Hi @chrisha 

There is some transparent space around the black area in this image, so it displays "bleed" outside. 

 

As a workaround, you can insert a round or a square shape. Put the image on the top of the shape. Hold on Shift key and select the image and the shape at the same time, then right-click your mouse and group them. At last, format the shape's background color dynamically according to rules.

 

Make sure that the image is on a higher layer than the shape.

042305.jpg

Regards,
Community Support Team _ Jing
If this post helps, please Accept it as the solution to help other members find it.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.