TiddlyMap

176 views
Skip to first unread message

sadtank

unread,
Jan 20, 2021, 5:59:17 PM1/20/21
to TiddlyWiki
Loving the TiddlyMap addon, big thanks to those who contributed.

I am noticing that the visualizations pull in relationships (linked-to) automatically from the text field of tiddlers. I have lots of links defined in various fields... So here's my question.

How can I set TiddlyMap to include tiddler fields (just like it does for the text area) for tiddler relationships?


</sadtank>

si

unread,
Jan 20, 2021, 6:29:25 PM1/20/21
to TiddlyWiki
You need to add the field as an edge type: http://tiddlymap.org/#tw-list

Go to Menu > Manage Edge Types. Then type "tw-list:[field-name]" and add it.

Hopefully that helps.

sadtank

unread,
Jan 20, 2021, 8:26:57 PM1/20/21
to TiddlyWiki
Amazing! I'll give that a try.

sadtank

unread,
Jan 22, 2021, 1:13:17 PM1/22/21
to TiddlyWiki
So while that works, I'm looking for a way to tell it to include all fields. Is there a wildcard that can be used?  Splat doesn't seem to work:

tw-list:*
On Wednesday, January 20, 2021 at 3:29:25 PM UTC-8 si wrote:

si

unread,
Jan 22, 2021, 2:01:51 PM1/22/21
to TiddlyWiki
I'm not aware of any way to do this other than just adding all your fields as edge-types manually. But it's possible that someone else will have suggestion.

sadtank

unread,
Jan 22, 2021, 2:15:08 PM1/22/21
to TiddlyWiki
If no wildcard in Tiddlymap... may be theoretically possible to have a macro that updates a field with the links, that way the edge-type could look at a single field...? that might push the complexity on to TW macros instead of TiddlyMap....

sadtank

unread,
Jan 22, 2021, 6:05:06 PM1/22/21
to TiddlyWiki
Ok. so that too me too long.

Turns out, all that HAS to happen is for a tiddler to exist in the right namespace. If you want the field "owner" to be included in the edge manager then create a tiddler titled:
$:/plugins/felixhayashi/tiddlymap/graph/edgeTypes/tw-list:owner

So, here's a macro that gets the names of all fields in your TW file, then prepares them into links. Simply click the links you want to be added to edge manager as a fast way to create tiddlers in this namespace. Ideal solution? No. But good enough for now. Would prefer an automated solution or even a more elegant list with checkboxes to manage.

    \define allfieldnames(title) <$set name="name" value="$:/plugins/felixhayashi/tiddlymap/graph/edgeTypes/tw-list:$title$"> <$link to=<<name>>>$title$</$link> </$set> \end

    <table class="tc-view-field-table"><tbody><$list filter="[fields[]sort[title]!is[system]]" variable="listItem"><$macrocall $name="allfieldnames" title=<<listItem>>/> <br/> </$list> </tbody></table>

Look at other tiddlers in this namespace to understand the other fields that are possible, like line types and colors.

Note: There seems to be some issues with how edge manager looks in fields for links... for example, a field that includes the text "[[tiddler]]'s". That apostrophe 's' will break how it finds all links in that field.

</sadtank>

si

unread,
Jan 23, 2021, 10:42:43 AM1/23/21
to TiddlyWiki
Try this:

<table>
<$list filter="[is[tiddler]!is[system]fields:except[title text modified created]]">
<tr>
<td><<currentTiddler>></td>
<td>
<$vars edge-tiddler={{{ [[$:/plugins/felixhayashi/tiddlymap/graph/edgeTypes/tw-list:]addsuffix<currentTiddler>] }}}>
<$reveal type="nomatch" stateTitle=<<edge-tiddler>> stateField="title" text=<<edge-tiddler>>>
<$button>
<$action-createtiddler $basetitle=<<edge-tiddler>>/>
Show edges
</$button>
</$reveal>
<$reveal type="match" stateTitle=<<edge-tiddler>> stateField="title" text=<<edge-tiddler>>>
<$button>
<$action-deletetiddler $tiddler=<<edge-tiddler>>/>
Hide edges
</$button>
</$reveal>
</$vars>
</td>
</tr>
</$list>
</table>

You could add other columns for editing the style, label etc.

si

unread,
Jan 23, 2021, 10:52:10 AM1/23/21
to TiddlyWiki
* "fields:except" should be "fields:exclude" in the above tiddler.

If you want a button to add all fields as edge types in one go, you could try something like this:

<$button>
<$list filter="[is[tiddler]!is[system]fields:exclude[title text modified created]]">
<$action-createtiddler $basetitle={{{ [[$:/plugins/felixhayashi/tiddlymap/graph/edgeTypes/tw-list:]addsuffix<currentTiddler>] }}}/>
</$list>
Add all fields as edge types.
</$button>

Reply all
Reply to author
Forward
0 new messages