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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Matan_B
Regular Visitor

integrate svg with css manipulations

hi, 
i'm tring to create custom visualization to show svg image and highlights areas (polygons) in the image with css.

the results should be a table of objects and when clicking on the object in the table, then higlights the object in the svg image.
the issue i'm facing with is that i am only able the display the svg image in <iframe> adn i cant access to the raw data to manipulate the css for the highlighting functionality.
fetching the svg is blocked by the sandbox (i assume it's the cause).
appretiate any help

2 REPLIES 2
Anonymous
Not applicable

Thanks for the reply from lbendlin , please allow me to provide another insight:

Hi, @Matan_B 

You can try inserting HTML into the SVG first and then referencing CSS within the HTML. For example, you can use the <foreignObject> element to reference HTML.

Below is a screenshot from the relevant documentation:

vlinyulumsft_0-1726818566886.png

 

For detailed information, please refer to:

<foreignObject> - SVG: Scalable Vector Graphics | MDN (mozilla.org)

SVG Integration (svgwg.org)

Of course, if you have any new ideas, you are welcome to contact us.
 

Best Regards,

Leroy Lu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

lbendlin
Super User
Super User

Which visual are you using?  Table , Matrix, HTML5 viewer, something else?

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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