darkstar icon indicating copy to clipboard operation
darkstar copied to clipboard

wordcloud example troubles

Open cnuernber opened this issue 4 years ago • 2 comments

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 avatar Apr 18 '20 15:04 cnuernber

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

cnuernber avatar Apr 18 '20 15:04 cnuernber

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.

jackrusher avatar Apr 18 '20 17:04 jackrusher