A tiny example plot using OCaml, Js_of_ocaml, Brr, and Vg.
Check it out here. You can click on the plot to add dots, remove them, and save your image!
The site is in docs
so it works with GitHub pages.
To build the site, run just build_site
(or simply dune build --profile=release
).
If you want to hack on it, note that I didn't bother to specify package versions for the opam
file. But you could use the lock file if you want to play with it:
opam install . --deps-only --locked
In particular, this will ensure you have the pinned version of vg
, which is needed to work with brr
rather than the jsoo library.
The generated JavaScript is 125KB (43KB gzipped). Not too bad, all things considered.