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

Did you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now

Allow for rectangular imageUrl sizes in matrix and table visuals

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.
Status: Needs Votes
Comments
fbcideas_migusr
New Member
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.
Tavia_Nguyen
New Member
Has anyone figured a solution to the square dimensions yet? This would really be appreciated if imageURL would allow for rectangular/wider images.
Barry_DYER
New Member
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.
Larry_Pfaff
New Member
regardless of how an image is displayed, the developer should have control over image height, width, and cell padding in the table visuals.
steven_fayers
New Member
This is an absurd limitation by MS not thinking how people might want to use this capability.
Anonymous
Not applicable

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.

nishalit
New Member
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.
nishalit
New Member

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/

nishalit
New Member

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.

fbcideas_migusr
New Member
Status changed to: Needs Votes