Select to view content in your preferred language

Displaying SVGs in popups

1106
0
05-05-2019 08:05 PM
GeeFernando
Frequent Contributor

Hi everyone,

 

On the weekend, I came across the ability to add SVGs into popups, and pass numbers as text into SVG expressions to change size, color, etc.

Example of SVG

<svg width="100" height="100">
  <circle cx="50" cy="50" r="40" stroke="green" stroke-width="4" fill="yellow" />
</svg>‍‍‍

<svg width="{ball_width_as_String}" height="{ball_height_as_String}">
  <circle cx="50" cy="50" r="40" stroke="green" stroke-width="4" fill="yellow" />
</svg>

I haven’t seen any documentation around this yet.

But, I can imagine these being useful in creating infographics to show gender breakdowns, modes of travel to work, etc.

 

Has anyone played around with SVGs in popups before and willing to share any nice examples?

 

Thanks,

Gee

0 Replies