Bonus Drop #23 (2023-08-27): [Observable] Plot Twisting

A look behind the OJS Plot curtain

We’ve covered Observable Plot in previous Drops, but this one goes a bit deeper and lets you see the HTML/SVG under the covers, and shows how to work with it to add extra functionality not-yet-baked-into this awesome framework.

a couple of [UNK] that are next to a [UNK]

Unfortunately, this is Substack, so no fancy “vis-embeds” or extra code here.

Thus, please make your way to https://rud.is/wpe/2023-08-27/ which has links to the source repository you can clone and hack on, and an Observable notebook you can fork away.

FIN

I feel compelled to note that the code I’m using at work (mentioned in the above link) is very basic/straightforward Plot code in a Vite project.

I actually developed that external “blog post WPE” as a Vite project and did the whole npm dance and had it working 100% fine locally. The npm run build step did not cough up a lung, too. But, when I deployed it, a bunch of stuff broke due to the very janky eval hack I’m using in the one Lit element.

So, I ended up doing what I should have done in the first place and deconstructed it all back to pristine vanilla JS, and un-fancied some of the ESM module usage.

Drop a note/issue if you hit any snags! ☮

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.