Now that I’m Observable, I’d like to chart data. I looked at various charting libraries, but problems:
They did not support d3 latest
They did not provide an es6 module (for example via unpkg.com’s ?module feature)
I realize that on Observable I can use UMD/IIFE/… via require() but my work also needs to run in a project that is es6 module based.
It’s possible that I don’t really need a full blown charting library. The Visualization collection looks superb. Do most of us roll our own charts rather than using a charting library?
I’m building an Agent Based Modeling system like NetLogo. Their plotting support is mainly line/point charts and histograms that grow with every step of the model. The line charts may show two or more parameters but most commonly only one.
A concrete example would be a “boids” flocking model, with the chart showing the “coherence” of the flock via their heading: 0 means no coherence (random headings) while 1 would mean each boid had the same heading. At every step of the model, the new coherence point would be added.
Another would be predator/prey with two lines: one for wolfs, the other for rabbits. Evolving quickly with new points for each step.
So matching the NetLogo plotting ability gets us an A.
But the point of the project is to place a small JavaScript NetLogo core within a far richer environment that their static Java implementation. So the modeler would be free to use far more interesting visualizations of their model data. There lies the A+ and the goal of our work!
Now here’s a really odd solution for chart.js. It is not as far as I can determine and es6 module. BUT it can use es6 import using the “empty” form of import: import "module-name";