TW5-TiddlyMap icon indicating copy to clipboard operation
TW5-TiddlyMap copied to clipboard

Parent.of child.of types of connections.

Open danielo515 opened this issue 11 years ago • 14 comments

Letting the connections having a type can allow you to express complex relationships. Is not just about labels, maybe you want a label "property of" but you want to express that the linked node is "child of" the connected node. This can be visually represented by nodes sizes and text weight.

danielo515 avatar Nov 25 '14 13:11 danielo515

Hi Danielo,

I think this is not intuitive and other people will want to use sizes to symbolize other stuff (For example I plan in a private project to display nodes bigger based on their click-count; similar to a tag cloud).

I will give you a chance at one point to order the nodes hierarchically (top down or left to right). Then you can say based on which relation to create the hierarchy.

Felix

felixhayashi avatar Nov 26 '14 10:11 felixhayashi

mm, what about some special fields such as bigger-than and smaller-than to decide? maybe we can also include some special placeholders such as parent or child.

danielo515 avatar Nov 26 '14 19:11 danielo515

@danielo515 yes, I also thought about a field that defines how big the node should be too but it is something I really want to spend some time thinking on. I will post my ideas here for discussion once I am done with other issues.

At the moment, I rather think that this should be symbolized via edges. for example consider a normal UML class diagram. It also does not make the super class bigger or child classes smaller but it has a special edge to symbolize "extends". I think the better way would be to stick to internationally known conventions and draw any edge that is named "extends" or "childof" according to such a standard.

Felix

felixhayashi avatar Nov 27 '14 09:11 felixhayashi

both would be nice...

  • styling a node => easy
  • categorizing a node-type, less simple
    • what's the parent? => specified uniquely via field?
    • what about multiple inheritance?
    • sure, when would a user do that? right?
      • choose first?
      • merge all?
      • mhhh... which overrides which?
        • tricky bits

tobibeer avatar Nov 28 '14 22:11 tobibeer

yes exactly it is too tricky in my eyes ;) I will instead focus on core functions at the moment. Let us discuss this again once the basics all work and everything runs smoothly

felixhayashi avatar Nov 28 '14 22:11 felixhayashi

I will add the possibility to add different styling to edges (weight, color, style etc.) as announced (#4) but I cannot go beyond that at the moment, unless vis.js allows me. So I close this issue now. If some new information arrives, I will link it to this issue.

felixhayashi avatar Mar 02 '15 12:03 felixhayashi

Seems like vis will allow this in 4.0, I'll leave this issue open as a reminder...

felixhayashi avatar Mar 30 '15 20:03 felixhayashi

So at the moment is there a field that defines the size of the node? Surely such a thing would be useful regardless of what people will want to use node size to represent.

xnmp avatar May 16 '15 15:05 xnmp

Hi @xnmp

I had a look at it and unfortunately it seems that vis.js does not support changing the node size at the moment. I ca

Please have a look at: http://felixhayashi.github.io/TW5-TiddlyMap/index.html#Tweaking%20the%20Graph

Maybe you could do the following:

{
  "nodes.fontSize": "30"
}

selection_650

felixhayashi avatar May 21 '15 16:05 felixhayashi

So suppose I wanted to make node number "837211ea-ed82-4b1c-9847-b64fab9ae78e" really big. I'm trying to make a group called "mygroup" which has fontsize 30, and then specify that the node is part of this group. The code below didn't work. How do I amend it?


{
"groups": {
  "mygroup": {
    "fontSize": "30"
  }
},
  
"nodes":{
  "id": "837211ea-ed82-4b1c-9847-b64fab9ae78e", 
  "group": "mygroup"
}
} 

xnmp avatar May 22 '15 02:05 xnmp

Hi @xnmp

nope, this is not how you do it. It is not possible at the moment to manually assign styles to individual nodes or groups of nodes.

There is an open ticket for that: https://github.com/felixhayashi/TW5-TiddlyMap/issues/16. So its on my agenda but I cannot say when it gets implemented. Because I also want to wait till visjs 4.0 is released where this might be possible out of the box...

-Felix

felixhayashi avatar May 22 '15 12:05 felixhayashi

Good news, it's just been released!

http://visjs.org/blog.html

xnmp avatar May 23 '15 02:05 xnmp

yap :) because they changed much of the API I'll need some time before we can use it for tiddlymap...

felixhayashi avatar May 23 '15 11:05 felixhayashi

I just read through this post and stumbled over this: @felixhayashi commented on 26 Nov 2014:

For example I plan in a private project to display nodes bigger based on their click-count; similar to a tag cloud

This is exactly what I already thought of for my current project. How would you realize this?

samuelwiechmann avatar Mar 18 '18 17:03 samuelwiechmann

The best vis-network can do is creating different node-types with different fontSize/widthConstraint.maximum settings. These are both configurable per node-type (just not through the configuration menu).

  1. Create node types for a variety of different sizes.
  2. Put fancy filters into their scope which considers "parent of", "child of", "# of clicks", etc...
  3. For each node type, Edit the style field of $:/plugins/felixhayashi/tiddlymap/graph/nodeTypes/$(node type)$
    • The json you put is something like this: "font":{"size":36},"widthConstraint":{"maximum": 800}}

I realize it's not optimal to have "tiers" if different sizes, rather than just have the sizes be dynamic to some variable, but this is what you get. I'm closing this issue out again.

flibbles avatar Sep 07 '22 15:09 flibbles