Adding images into a shape while mapping through data #1307
-
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 6 replies
-
Hey @hyfydistro 👋 thanks for checking out Here's a sandbox demo, hope it helps! |
Beta Was this translation helpful? Give feedback.
-
Is it possible for the bubbles not to overlap each other? I thought the had something but I'm having difficulty. @williaster |
Beta Was this translation helpful? Give feedback.
Hey @hyfydistro 👋 thanks for checking out
visx
. I think to do this you'd just need to lean on theSVG
api for using an image as a fill. One way to do this is to create a<pattern />
for each image within a<defs />
tag, then use those patterns as the fill for the circle. Note that pattern id's that you define should be unique on the page else you will have overlap/non-determinant behavior.Here's a sandbox demo, hope it helps!