- ui-vega defines a reagent wrapper to render vega-plots
- vega is a browser based plot renderer, that uses declarative syntax to build plots
- vega comes as vega spec and vega-lite spec. vega lite spec is compiled to vega-spec and is a more condensed specification with less features.
- is a simple data-driven plotting dsl.
- provides a few functions to quickly generate vega specs, and therefore vega plots.
Run clj -X:docs
to see ui-vega goldly snippets.
clj -X:docs:build :profile "npm-install" clj -X:docs:build :profile "npm-compile2" clj -X:docs
- Legacy gorilla-plot was originally written by Jony Hudson for Gorilla repl.
- Gorilla-Plot Legacy uses vega-spec, updated to vega 5 spec.
- multiplot uses vega-lite spec.
clj -M:perf
clj -M:test
./scripts/test-cljs.sh
vega problems
If there are problems in using vega with errors to "buffer" then npm install shadow-cljs --save
might fix it.
thheller: both buffer and process are polyfills packages that shadow-cljs will provide ...
the npm package is mostly the for CLI stuff but also brings in some extra npm packages
the compiler is from the CLJ dependency you have in project.clj.
the npm stuff never does any actual compilation, just runs the java process
you do not need to worry about process or buffer at all you can fix this easily by bumping :compiler-options {:output-feature-set :es6} or whatever language level is appropriate :es8 is good if you have bunch of async/await code in libs
With UNPKG you can see output of npm builds. Useful for debugging. https://unpkg.com/browse/[email protected]/build/vega-embed.js
vega-embed iterator.js bug:
- use vega-embed 6.18
- include an iterator.js file with the contents module.exports = function() {};. https://shadow-cljs.github.io/docs/UsersGuide.html#_patching_libraries might be helpful.