applied-science / darkstar

A minimal wrapper over Vega/Vega-lite as a single JVM-only Clojure library
84 stars 9 forks source link

wordcloud example troubles #4

Open cnuernber opened 4 years ago

cnuernber commented 4 years ago

Trying to get this wordcloud example working:

https://vega.github.io/vega/examples/word-cloud/


applied-science.darkstar> (->> (slurp "wordcloud.json")
       vega-spec->svg
       (spit "wordcloud.svg"))
ERROR TypeError: Cannot set property 'height' of null
nil

That error isn't propagated to the repl; it is just printed.

cnuernber commented 4 years ago

Ouch. This is because it is using canvas calls to render the text. May not be fixable without implementing more of the canvas API.

jackrusher commented 4 years ago

There are a number of examples that rely on APIs we don't yet support -- setTimeout and such from the browser, sometimes canvas, and so on. I want to build out a proper test harness and assess the current state of things before I push the library to Clojars.