D3.js for knowledge mapping: how to automatize any tiddler update on the graph ?

173 views
Skip to first unread message

Silverfox

unread,
Apr 12, 2018, 3:35:50 PM4/12/18
to TiddlyWiki
Hello, 

You'll find here http://archipel.tiddlyspot.com, a new proof of concept of D3 plugin(V5) for TiddlyWiki (there are still some bugs and a lot to do before having a reliable plug-in)

As you can see, my target is to display a dynamic visualization of the TW table of content, and to associate a color code to each tiddler depending on the knowledge maturity (color of a tag)

The mechanism is the following:
* a TW macro generates a a csv interpreted text in a tiddler (kTree macro)
* another macro, activated by a button, wikifies it to have pure csv text tiddler (KMapRoot.csv)
* a javaScript macro uses D3 plugin and the previous csv to generate the graph

My question is : 

Is there a way to avoid clicking the button ? I wish I could have an automatic update of the graph as soon as any tiddler is updated...

Thank you for your help, 

Do not hesitate to share your comment on this POC in general

Nicolas 

Jan

unread,
Apr 12, 2018, 4:47:08 PM4/12/18
to tiddl...@googlegroups.com
Beautifull!

Try This, it works for me...
\define selaction()
<$wikify name=myvalue text={{kTree macro}} output="text">
<$fieldmangler tiddler="KMapRoot.csv">
<$action-sendmessage="tm-add-tag" param="csv">
<$action-setfield $tiddler="KMapRoot.csv" text=<<myvalue>> />
<$action-setfield  $tiddler="KMapRoot.csv" $field="type" $value="text/csv"/>
</$fieldmangler>
</$wikify>
\end

<table>
<tr>
<td>
Select the root tag:<br>
<$select tiddler="KMapRoot" actions=<<selaction>> >
<$list filter='[tags[]!is[system]sort[title]]'>
<option value=<<currentTiddler>>><$view field='title'/></option>
</$list>
</$select>
--
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+...@googlegroups.com.
To post to this group, send email to tiddl...@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/f84b0ea1-06d6-4f77-9e37-f778e9400a16%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Silverfox

unread,
Apr 13, 2018, 1:07:02 AM4/13/18
to TiddlyWiki
@Jan

Thank you it's great, I will integrate it? No  click after changing the selector is great
but it does not solves what I wanted (sorry if I was not clear)

All,

If a add or remove a tiddler, or if I update the colored status of one tiddler I would like the graph to be immediately updated without having to click on the button...
in other words how to automatize the generation of csv file from a Wikitext macro ?


Jan

unread,
Apr 14, 2018, 9:05:44 AM4/14/18
to tiddl...@googlegroups.com
Hi Silverfox, I have seen you have not included the tiny select trick to archpelago yet.
It was of course meant to be integrated, if the questionmark is about whether this is allowed.
Jan
--
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+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.

Silverfox

unread,
Apr 19, 2018, 3:35:18 PM4/19/18
to TiddlyWiki
@Jan

Your select trick has been included now, thank you (see update http://archipel.tiddlyspot.com)

But I'm still looking for some help to update automatically the graph (without having to press the update button) when add, remove or modify a tiddler
the current process is described in the archipel page

Nicolas

Diego Mesa

unread,
Apr 19, 2018, 3:53:13 PM4/19/18
to TiddlyWiki
This conversation reminds me of Evan Blaster's (of formula plugin fame) work on trying to make TW refresh just important parts automatically in the backend. Perhaps someone else more familar with that work can comment?

David Gifford

unread,
Apr 19, 2018, 5:31:05 PM4/19/18
to TiddlyWiki
nice! just added to the toolmap https://dynalist.io/d/zUP-nIWu2FFoXH-oM7L7d9DM in the data visualization section

Dave
Reply all
Reply to author
Forward
0 new messages