neo4j-contrib / neovis.js

Neo4j + vis.js = neovis.js. Graph visualizations in the browser with data from Neo4j.
Apache License 2.0
1.61k stars 324 forks source link

“updateWithCypher” showing blank while “renderWithCypher” works #380

Open ruined404cjy opened 9 months ago

ruined404cjy commented 9 months ago

Expected Behavior (Mandatory)

Using “updateWithCypher” function with a valid new statement to update the visualization rather than replace it.

Actual Behavior (Mandatory)

When using "renderWithCypher", the visualization is replaced normally with new result, but when using “updateWithCypher”, the visualization goes blank( the cypher statement is validated to be able to get result ).

How to Reproduce the Problem

code:
    nodeClick (node) {
      this.viz._network.off('click')
      const statement ='MATCH (n)-[r]-(m) WHERE ID(n) = ' + node.nodeId + ' RETURN n, r, m'
      this.viz.renderWithCypher(statement)
    },

Simple Example

      var config = {
        container_id: 'viz', 
        server_url: 'neo4j://localhost:7687', 
        server_user: 'neo4j',
        server_password: '123456',
        labels: {
          "工序链": {
            caption: 'name',  
            font: { size: 15, color: '#606266' },
          },
          "工艺知识": {
            caption: 'name',  
            font: { size: 15, color: '#606266' },
           },
        },
        relationships: {
          "has_process": {
          },
          "next": {
          }
        },
        arrows: true,
        hierarchical: false, 
        hierarchical_sort_method: 'directed',
        encrypted: 'ENCRYPTION_OFF',
        trust: 'TRUST_ALL_CERTIFICATES',
        initial_cypher: 'MATCH (n)-[r]-(m) WHERE n.name = "粗车" RETURN n, r, m'
      }

Screenshots (where it's possibile)

Specifications (Mandatory)

Currently used versions

Versions

sierrazhan commented 3 months ago

Hi!! I was wondering if there are any updates for this issue and if not do you have any recommendations for work arounds in the meantime