visualGraph
visualGraph copied to clipboard
Problem with sub nodes and references?
@Dletta I try to show references to sub-nodes and display object values, but get an error message
d3.v4.min.js:2 Uncaught DOMException: Failed to execute 'querySelector' on 'Document': '#<STARTNODE>/<SUBNODE>/4973947925444637' is not a valid selector.
at Object.ct [as select] (https://d3js.org/d3.v4.min.js:2:9416)
at SVGCircleElement.detail (https://<DOMAIN_VISUALGRAPH>/visualGraph.js:106:21)
at SVGCircleElement.<anonymous> (https://d3js.org/d3.v4.min.js:2:8198)
Maybe something changed in new(est) gun? Path like element IDs with slashes?
#<STARTNODE>/<SUBNODE>/4973947925444637
Looks like it's related to a d3 selector method and maybe a string converter there. I will have a quick look and will do a quick update commit to latest versions
On Fri, Mar 18, 2022, 08:22 pwFoo @.***> wrote:
Maybe something changed in new(est) gun? Path like element IDs with slashes?
#<STARTNODE>/<SUBNODE>/4973947925444637
— Reply to this email directly, view it on GitHub https://github.com/Dletta/visualGraph/issues/2#issuecomment-1072405141, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABLWWEX74OXUXQ33K2ZTR43VAR7QFANCNFSM5RB2JYTA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you were mentioned.Message ID: @.***>
This issue is solved. It was an issue where d3 and it's friendly jquery couldn't cope with the new #soul/subsoul, meaning the dash was not recognized as an id in the selector. I also unpinned gun versions and it is now running on the latest version. There seems to be no issue there.
HI @Dletta Problem still exists. If I show a sub node as start point I see all direct child nodes.
"parent/sub" -> 3 children
If I start with des parent node I see just 2 of 3 child nodes at my sub node?
parent -> sub -> 2 of 3 children
Still same error if I try to show node properties by click
d3.v4.min.js:2 Uncaught DOMException: Failed to execute 'querySelector' on 'Document': '#<PARENT>/<SUB>/98039408' is not a valid selector.
at Object.ct [as select] (https://d3js.org/d3.v4.min.js:2:9416)
at SVGCircleElement.detail (https://<DOMAIN>/visualGraph.js:106:21)
at SVGCircleElement.<anonymous> (https://d3js.org/d3.v4.min.js:2:8198)
Still "/" in dom element id
<circle id="<PARENT>/<SUB>" r="3" fill="rgb(120,0,0)" cx="350.4860356812201" cy="244.6140260048059"><title><PARENT>/<SUB></title></circle>
Can you show me your graph structure?
I switched away from querySelector, maybe I missed one of the d3.selects. (I simply changed any d3.select to document.getElementById, so feel free to see where I missed it and make a PR.)
I build the graph with demo data.
gun.get("APP_NAME").get('TABLE').map().once((item, soul) => console.log(soul, item))
c {_: {…}}
VM585:1 1586901425 {_: {…}, id: 2, name: 'ITEM_2', value: 'second'}
VM585:1 2213577188 {_: {…}, id: 1, name: 'ITEM_1', value: 'first'}
VM585:1 3227399464 {_: {…}, id: 3, name: 'ITEM_3', value: 'third'}
Showing full graph from APP_NAME ITEM_3 is missing!

Starting with APP_NAME/TABLE all items are shown.

Error if I click ITEM_3
Uncaught DOMException: Failed to execute 'querySelector' on 'Document': '#APP_NAME/TABLE/3227399464' is not a valid selector.
at Object.ct [as select] (https://d3js.org/d3.v4.min.js:2:9416)
at SVGCircleElement.detail (https://<DOMAIN>/visualGraph.js:106:21)
at SVGCircleElement.<anonymous> (https://d3js.org/d3.v4.min.js:2:8198)
@Dletta Have you found a solution for that id problem?
@Dletta Tested with a new deployed version with the same problem.
It works fine to show structure like
container -> many items
But if container is a sub-node some items are missing!
app1 -> container -> 2 of 4 items
Wie it doesn't render all container items recursive?
Hmm, not sure. It's depth-first search with a limit, I gotta check why it's not continuing, maybe I will add a limit control and some console logs to better indicate if the limit is reached.
The error seems to indicate it reaches a point where it thinks it has a reference to a child, but it can't get from it
On Sat, Apr 16, 2022, 05:05 pwFoo @.***> wrote:
@Dletta https://github.com/Dletta Tested with a new deployed version with the same problem.
It works fine to show structure like
container -> many items
But if container is a sub-node some items are missing!
app1 -> container -> 2 of 4 items
Wie it doesn't render all container items recursive?
— Reply to this email directly, view it on GitHub https://github.com/Dletta/visualGraph/issues/2#issuecomment-1100627282, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABLWWES7RVXLVVQEYKIFL5TVFKGHXANCNFSM5RB2JYTA . You are receiving this because you were mentioned.Message ID: @.***>
@pwFoo Still interested in a fix for this?