reaviz / reagraph

🕸 WebGL Graph Visualizations for React. Maintained by @goodcodeus.

Home Page:https://reagraph.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Adding clusterAttribute causes tick error

candcconsulting opened this issue · comments

Describe the bug

With the following definition

<GraphCanvas nodes={displayNodes} edges={displayEdges} 
          // clusterAttribute="schema"
          edgeInterpolation="curved"
          edgeLabelPosition="above"
          labelType="edges"
          ref={graphRef}
          onCanvasClick={onCanvasClick} 
          onNodeClick={onNodeClick}
          
          sizingType={displayNodes.length > 0 ? "pagerank" : undefined}
          draggable={true}
/>

if clusterAttribute is enabled then the following error is generated

ERROR
Cannot read properties of undefined (reading 'tick')
TypeError: Cannot read properties of undefined (reading 'tick')
    at force (http://localhost:3000/static/js/bundle.js:508477:21)
    at http://localhost:3000/static/js/bundle.js:500073:9
    at Map.forEach (<anonymous>)
    at Object.tick (http://localhost:3000/static/js/bundle.js:500072:14)
    at Object.step (http://localhost:3000/static/js/bundle.js:508837:11)
    at run (http://localhost:3000/static/js/bundle.js:508425:25)
    at http://localhost:3000/static/js/bundle.js:508431:5
    at new Promise (<anonymous>)
    at tick (http://localhost:3000/static/js/bundle.js:508421:10)
    at http://localhost:3000/static/js/bundle.js:509950:13
the clusters are shown (takes some time) when the error is closed and the error is not redisplayed unless the graph is closed and re-opened

Steps to Reproduce the Bug or Issue

Create a node dataset with the cluster information in data : {schema : "123"}
turn on clusterAttribute

Expected behavior

Just expect the nodes to be displayed

Screenshots or Videos

No response

Platform

"reagraph": "^4.15.18",
"@types/react": "^17.0.9",
"@types/react-dom": "^17.0.9",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Windows 11
Chrome Version 122.0.6261.95 (Official Build) (64-bit) (although same issue in Edge)
Node 18.19.0

Your Example Website or App

No response

Additional context

No response

Can you share a example? Looks like all the demos work fine.

What do you want the example of ... the data .. or ?

Hi @amcdnl I added you to my sandbox with the data, but the sandbox is complaining about import
Let me know if you want me to recreate a smaller repo ... somewhere.

Is this still an issue?

I removed the feature from my app .. .so it may still be a problem, but I am not using the feature