Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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>"
Any suggesation is really appreciable.
Thanks,
Snandy
Solved! Go to Solution.
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: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>
Best Regards,
Dale
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: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>
Best Regards,
Dale
can you render an svg on anything else other than a table? I'm looking for a single cell widget to display an image for an indicator. I've tried image grid and simple image.
Thanks for your solution..It works
This SVG code works fine for me, however the first string is not needed you only need the part inbetween the SVG tags.
Have you read this series of blog posts on SVG images in Power BI?
https://dataveld.com/2018/01/13/use-svg-images-in-power-bi-part-1/
https://dataveld.com/2018/01/15/use-svg-images-in-power-bi-part-2/
https://dataveld.com/2018/07/16/use-svg-images-in-power-bi-part-3/
Edit: you need to have the data in columns for the HTML viewer to work, measures do not work in my experiance.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
99 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
102 | |
87 | |
64 |