Forum Discussion

snandy2011's avatar
snandy2011
Icon for Helper IV rankHelper IV
7 years ago
Solved

Some SVG codes not running on Power BI

Hi Experts,

 

I am learning now creating SVG image on Power BI. I have some multiple SVG code, which run perfectly on any editor, but when i put those code on Power BI,it shows nothings. Is there any rule to write SVG code on Power BI?

 

for example, I have a simple below polygon code, which is running perfectly on editor, but not on Power BI,

 

"data:image/svg+xml;utf8," &
 "<svg 
             
 height='500' width='500' fill = 'Green'>
		    <polygon points='250,60 100,400 400,400' />
        <animateMotion
       path='M 20 20 V 50 Z'
       dur='3s' repeatCount='indefinite' />
		    
	  </svg>"
 
Can you please identify what wrong in this code?Not only this code, I have some svg codes which is not running on Power Bi.

 

Any suggesation is really appreciable.

 

Thanks,

Snandy

  • Hi Snandy,

     

    Please download the demo from the attachment. 

    The only difference between the 1 and the 2 is the blue part in the code below. If you'd like to show them in a Table visual, you need to change the "Data category" to "Image URL".

    data&colon;image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" height='500' width='500' fill = 'Green'><polygon points='250,60 100,400 400,400' /><animateMotion path='M 20 20 V 50 Z' dur='3s' repeatCount='indefinite'/></svg>

    Some-SVG-codes-not-running-on-Power-BI

     

    Best Regards,
    Dale

4 Replies