cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ThomasDay Member
Member

svg image size--matrix makes huge space for small image

Hello All,

 

I followed Brian Grant's fabulous video on creating svg image sparklines.  An example of the resulting svg code looks like this--you can see:  The image width is 30 pixels, and the height is 15.  All of the 7 points for this sparkline are computing y's and x's that are between those two numbers. 

data:image/svg+xml;utf8,

<svg width="30" height ="15" version="1.1" xmlns="http://www.w3.org/2000/svg" style="background: #fbfbfb">
  <polyline points="0,15,  5,15,  10,15,  15,15,  20,0,  25,14,  30,14"  fill="transparent"  stroke="blue"  stroke-width="1"/>
</svg>

Here's the before picture of the matrix:BeforeMatrix.png

 

All is well...row sizes and all are perfect.  Here's the after picture.  The sparkline is a good size but the row height is nutty and if I make the column width smaller, it crowds out the edge of the svg.  Any idea what's going on?  I can't get the rows and columns to match what I think the svg size should be.  Thanks in advance, Tom

AfterPicture.png

4 REPLIES 4
Community Support Team
Community Support Team

Re: svg image size--matrix makes huge space for small image

Hi @ThomasDay,

 

Maybe you can consider to manually modify the image height property to setup image height of row.

2.png


Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin Sheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.



For learning resources/Release notes, please visit: | |
Highlighted
ThomasDay Member
Member

Re: svg image size--matrix makes huge space for small image

@v-shex-msft  What a good idea! Turns out I can modify the image height down to 24 and am looking for a standard 15 or 16 to match a standard font size of 9 or 10.  It's definitely better tho.  Sure would like to find a way to have it match the available area...i.e. be fully scaleable.

 

Now what I'm seeing when in the app.powerbi service is:

 

 

App.powerbiservice.png

 

Instead of the desktop display of:

 

 

Desktop.png

 

 

Any ideas on this?  Thanks,

Tom

Community Support Team
Community Support Team

Re: svg image size--matrix makes huge space for small image

HI @ThomasDay ,

 

If you not change image height property, did these graph works on service side? If not, I think it means power bi service not support analysis svg image.

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin Sheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.



For learning resources/Release notes, please visit: | |
ThomasDay Member
Member

Re: svg image size--matrix makes huge space for small image

@v-shex-msft  you are quite right, a computed svg image apparently does not work in power bi service.  Is that possible?  Why have computed svg's work in desktop and not in the power bi service?  Perhaps it's coming...is there any way to find out?

 

Thank you,

Tom