MEGA TRICK: SVG in Coda (one step away from generated charts and mind maps!)

Hi @Paul_Danyliuk

Was inspired by your SVG post (thank you!)

I’ve been trying to find a quick way (for years) to create a simple product milestone view (I always made these in Google Presos).

Using your naive SVG method, I’ve created this: https://coda.io/d/Formula-SVG_dL1cBD5Vsag. It actually works really well (though there are lots of formatting improvements that could be made.

Now I have a problem though - The regex formula to convert to “naive SVG” format is really expensive and slow on a performance basis. Of the total compute time of 250ms, 210ms of that is coming from the regex formula (copied below for viz).

Any ideas for how to streamline the conversion step to SVG?

Here’s that REGEX SVG conversion formula:
Concatenate(
“data:image/svg+xml,”,SVG_output_combined_markup.RegexReplace("\n|\t", “”).Split("").FormulaMap(
CurrentValue.Switch(
" ", “%20”,
“<”, “%3C”,
“>”, “%3E”,
“#”, “%23”,
CurrentValue
)
)
)