Skip to main content

Power BI

Needs Votes

Allow for rectangular imageUrl sizes in matrix and table visuals

Vote (135) Share
Darren Gosbell's profile image

Darren Gosbell on 30 Oct 2019 08:31:25

Currently when you use a column or measure with a category of imageUrl that has an svg image Power BI ignores the aspect ratio defined in the view box for the image and draws the image in an arbitrary square. It would be great if imageUrl would allow for rectangular images. In the case of svg this could be read from the viewbox attribute.

This would allow for the creation of dynamic databars and sparklines and other creative visualizations without having to write a full blown custom visual.

Comments (9)
Darren Gosbell's profile image Profile Picture

on 11 Apr 2023 17:45:59

RE: Allow for rectangular imageUrl sizes in matrix and table visuals

When creating SVG visuals using measures the container is always 1:1 ratio, which makes it very impractical for using in more concise tables as the row size is blown up to see the visual. For i.e. svg sparklines, bullet charts, whatever, it would be good to have other ratios possible, ideally fully custom.

Darren Gosbell's profile image Profile Picture

on 11 Apr 2023 17:45:58

RE: Allow for rectangular imageUrl sizes in matrix and table visuals

Allowing a custom height and width (rather than default square aspect ratio) for SVG in tables and matrices would open up huge possibilities for micro charts as demonstrated here: https://kerrykolosko.com/building-a-custom-gauge-table-with-html/

Darren Gosbell's profile image Profile Picture

on 07 Sep 2022 18:27:21

RE: Allow for rectangular imageUrl sizes in matrix and table visuals

Allow to define values bellow 24px to image height on table or matrix visuals, and also to define a different value to width allowing us to explore more the capabilities of SVG images.

Darren Gosbell's profile image Profile Picture

Kieran Leigh on 11 Jul 2022 09:05:39

RE: Allow for rectangular imageUrl sizes in matrix and table visuals

I've been looking at adding a custom column in a table which would use SVG to produce a visual. The ideal shape for this is no taller than the text, but quite wide.It seems that Power BI insists on allocating a square-shaped piece of space for the image to fit in. This means that when the visual is sized to the correct width, the allocated vertical space is wasted, and makes the rows much too tall.If I could set the correct width along with the height, this would solve my problem as the generated visual would always be the same (very not square) width and height. Power BI could allocate only the specified space.

Darren Gosbell's profile image Profile Picture

Steven Fayers on 25 Oct 2021 14:56:49

RE: Allow for rectangular imageUrl sizes in matrix and table visuals

This is an absurd limitation by MS not thinking how people might want to use this capability.

Darren Gosbell's profile image Profile Picture

Larry Pfaff on 26 Jul 2021 14:29:22

RE: Allow for rectangular imageUrl sizes in matrix and table visuals

regardless of how an image is displayed, the developer should have control over image height, width, and cell padding in the table visuals.

Darren Gosbell's profile image Profile Picture

Barry Dyer on 04 Sep 2020 08:16:57

RE: Allow for rectangular imageUrl sizes in matrix and table visuals

Agree that the ability to scale the SVG to the width of the cell would be a major improvement to this functionality. Square cells are OK for short periods but any data dense sparkline tends to get crowded quickly, e.g. COVID time series data per location.

Darren Gosbell's profile image Profile Picture

Tavia Nguyen on 27 Aug 2020 07:25:11

RE: Allow for rectangular imageUrl sizes in matrix and table visuals

Has anyone figured a solution to the square dimensions yet? This would really be appreciated if imageURL would allow for rectangular/wider images.

Darren Gosbell's profile image Profile Picture

Paul Turley on 06 Jul 2020 00:01:53

RE: Allow for rectangular imageUrl sizes in matrix and table visuals

Thank you, Darren. Having the ability to render SVG sprites, icons, databars and sparklines in a table or matrix cell is awesome but as Darren mentions; there are significant limitations in its implementation. Allowing the graphic scale to the cell dimensions would improve this capability significantly.

Merged Idea (3)