Hi all,

As it seems there is a lack of good plotting/visualization libraries for 
TW5 (besides vis), I am trying to make a simple plot.ly js wrapper for TW5 
along with a <$plotly> widget.

However, as this is my first real TW5 plugin, I'm struggling in some 
respects, and would love some input.

So far, I've wrapped the plotly.js library in an IIFE which provides 
'document' as either $tw.fakeDocument if building under node, or 
window.document for the browser. I'm building the plugin according to this 
guide 
<http://tiddlywiki.com/dev/#Developing%20plugins%20using%20Node.js%20and%20GitHub>
 
from the developer documentation, but I keep running into the limitations 
of $tw.fakeDocument. For instance, in the plotly library, there's a line 
which executes 
document.head.appendChild(/*...*/)

When I try to build the index.html, I get an error complaining that 
appendChild doesn't exist for 'undefined'. I can try working through errors 
like this one by one, but it seems this is fundamentally to do with the 
limitations of $tw.fakeDocument. (Also, the ploty javascript library is 
>150,000 lines of code, so I REALLY don't want to have to modify the 
original library at all). Is there a way for me to develop this plugin such 
that it doesn't build for node but it does work on the browser? Or is there 
something I'm overlooking?

Thanks,
Shane


-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/cf143d04-151a-477a-b264-e8b6d9164ff5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to