SciNim / nim-plotly

plotly wrapper for nim-lang
https://scinim.github.io/nim-plotly/
MIT License
179 stars 15 forks source link

Fixes #57 by importing api, changing html template #58

Closed Vindaar closed 4 years ago

Vindaar commented 4 years ago

As mentioned over in issue #57 by @brentp, we need to import api now in the plotly_js.nim file. I'm not quite sure why this wasn't required in the past?

In any case, aside from that the default location of the example HTML template to be used with the interactive fig8_* example had to be changed, because the default location for the generated js file isn't the nimcache dir anymore. Fortunately that has been changed.

@moukle once this is merged it should work again. Just make sure that after compiling the file via nim js fig8... you open the index_javascript.html file from within the examples directory (or otherwise change the src="fig8_js_interactive.js" line in your local example so that it matches your path to the file.