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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
plover
Advocate II
Advocate II

Add SVG image to SVG Code

Hey there

 

I am attempting to create an SVG that simply has an Icon and some text next to it.

Ive been able to get this to work in a simple online SVG editor with the following code: 

 

<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 80'>
<image height='8' width='8' href='https://s2.coinmarketcap.com/static/img/coins/64x64/1.png'> </image>
<text x='9' y='6.5' style='font:normal 7px sans-serif;' fill='Blue'>- AAVE</text>
</svg>

 


Which shows - 

plover_1-1686626017377.png

 

 

However when i put that into a measure in PowerbI to display on a row it fails to render the image like this - 
 
plover_0-1686625982110.png

 

Any ideas?

6 REPLIES 6
lbendlin
Super User
Super User

No SRC or HREFs allowed - you need to embed the image data in the dataset.

 

 

 

 

Sorry - what do you mean?

Thank you thats great. I am wondering though how i would read the contents of not a file, but a URL pointing to an image?

you ingest that data in the Power Query part. Call Web.Contents  on the uRl and store the result in Base64.

I was able to do that, but unable to add that into an existing SVG. Is it possible to get the SVG code from a URL pointing to an SVG?

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.