pygraphistry icon indicating copy to clipboard operation
pygraphistry copied to clipboard

[FEA] Have an option to display Relationship names without hover (can work for graphs below a certain number of nodes/relations)

Open Parth-Joshi-6669 opened this issue 2 years ago • 1 comments

I am using graphistry to display my Neo4J graphs in a web-app and my graphs are not too big in size. Would love to have an option to show relationship names above the edges in my graphs.

Since graphistry is very useful in showing massive graphs with lots of nodes and relationships, I can understand the relationship being shown only on hover, but would it be possible to display relationship names even without hover for graphs with number of nodes and relationships below a particular threshold?

Parth-Joshi-6669 avatar Dec 27 '21 12:12 Parth-Joshi-6669

Thanks @Parth-Joshi-6669 that makes a lot of sense, and you indeed guessed the typical case for big graphs!

I'm thinking through a few orthogonal aids here, curious if this matches up to your thinking?

1. Edges of interest prioritization cascade:

  • Enabled (default on)
  • Prefer points of interests (default on): When on, if all node labels are active, no edge labels will be shown. When off, the number of active node points of interest is ignored
  • Number of edges of interest: Similar to points of interest, max cap
  • Prioritize edges of interest connected to points of interest (default on), bigger points to smaller
  • Prefer on-screen edges
  • Prefer longer edges
  • Disallow short edges, similar to how arrows also disappear

Alternatively: Should we aim for a spatially even spread instead, similar to what's done for points? This may be easier to do after we support thick edges.

Also unclear: Should we support some sort of type-based selection, like "only show cars" (1 level), "only show cars that are also 4 wheel drive" (2 level), or "only show cars with > 30mpg or electric" (generic expression)? This feels like overreach for edges, but has been in discussion for nodes, so may come in with / as part of that...

2. Edges of interest label placement options

Currently, we either put edge labels in the middle or follow the cursor hover. Instead:

  • Position: source, dest, middle (default)
  • Edge side: Above, over, below, and maybe something that can also hint at directionality?
  • On hover: reuse

3. Edges of interest rotation options

  • Match edge angle (default on)

4. Edges of interest text rotation

  • Allow upside down (default off): When on and matching edge angle, do not auto-flip cases like (dst<-src)
  • Stack vertical text (default off): For nearly-vertical edges, whether to put text at a 90deg, or rotate individual characters and stack them vertically

5. Edges of interest label rendering: Same as POI --

  • background color/opacity
  • text color/opacity

Currently, in POI, there's a zoom effect where zoomed out you see the full background label, while zoomed in, just the text. I suspect we should do the same here.

lmeyerov avatar Dec 27 '21 18:12 lmeyerov