🏠 back to Observable

JavaScript InfoVis Toolkit Reuse

I’m trying to integrate pages with advanced visualization relying on the JavaScript InfoVis Toolkit created in the past. For sure, a lot could be made with D3.js, but here the idea is too reuse what was made before with a minimum of efforts.

At this stage, I didn’t succeed in importing the code (may be because it is was not modularized).

The web site is at https://philogb.github.io/jit/demos.html.

I uploaded the script as an attached document on a notebook, then I tried the following:
t = (await import(await FileAttachment(“jit.js”).url())).SCRIPTS

Here I do have an error which is not quite explicit:
t = TypeError: Cannot set property ‘$jit’ of undefined

Not being a javascript specialist, I would like to know what the issue could be, if some people already attempted to reuse this library and what could be eventually the actions for making it useable with ObservableHQ (link to some information which could help performing the adaptation).

Thanks in advanced for the support of the community

Maybe you can start from this example https://observablehq.com/@fil/hello-jit

Thank you so much, Fil.
I will work on it and keep you informed.
Best regards.
Nicolas

I succeeded creating a basic treemap. Thanks for your help