GithubHelp home page GithubHelp logo

Comments (6)

pomelo-nwu avatar pomelo-nwu commented on May 27, 2024

@nylqd 感谢发现问题,应该是数据解析出现问题,后面我们修复下

from g6vp.

pomelo-nwu avatar pomelo-nwu commented on May 27, 2024

@nylqd you can start debugging the issue from here: https://github.com/antvis/G6VP/blob/master/packages/gi-assets-neo4j/src/services/CypherQuery.ts#L11

from g6vp.

nylqd avatar nylqd commented on May 27, 2024

processResult as follow, is there any problem?

{
    "nodes": [
        {
            "id": "1",
            "label": "Person",
            "nodeType": "Person",
            "nodeTypeKeyFromProperties": "GI_TYPE",
            "data": {
                "label": "Person",
                "GI_TYPE": "Person",
                "born": {
                    "low": 1964,
                    "high": 0
                },
                "name": "Keanu Reeves"
            }
        },
        {
            "id": "0",
            "label": "Movie",
            "nodeType": "Movie",
            "nodeTypeKeyFromProperties": "GI_TYPE",
            "data": {
                "label": "Movie",
                "GI_TYPE": "Movie",
                "tagline": "Welcome to the Real World",
                "title": "The Matrix",
                "released": {
                    "low": 1999,
                    "high": 0
                }
            }
        },
        {
            "id": "2",
            "label": "Person",
            "nodeType": "Person",
            "nodeTypeKeyFromProperties": "GI_TYPE",
            "data": {
                "label": "Person",
                "GI_TYPE": "Person",
                "born": {
                    "low": 1967,
                    "high": 0
                },
                "name": "Carrie-Anne Moss"
            }
        },
        {
            "id": "3",
            "label": "Person",
            "nodeType": "Person",
            "nodeTypeKeyFromProperties": "GI_TYPE",
            "data": {
                "label": "Person",
                "GI_TYPE": "Person",
                "born": {
                    "low": 1961,
                    "high": 0
                },
                "name": "Laurence Fishburne"
            }
        },
        {
            "id": "4",
            "label": "Person",
            "nodeType": "Person",
            "nodeTypeKeyFromProperties": "GI_TYPE",
            "data": {
                "label": "Person",
                "GI_TYPE": "Person",
                "born": {
                    "low": 1960,
                    "high": 0
                },
                "name": "Hugo Weaving"
            }
        },
        {
            "id": "5",
            "label": "Person",
            "nodeType": "Person",
            "nodeTypeKeyFromProperties": "GI_TYPE",
            "data": {
                "label": "Person",
                "GI_TYPE": "Person",
                "born": {
                    "low": 1967,
                    "high": 0
                },
                "name": "Lilly Wachowski"
            }
        },
        {
            "id": "6",
            "label": "Person",
            "nodeType": "Person",
            "nodeTypeKeyFromProperties": "GI_TYPE",
            "data": {
                "label": "Person",
                "GI_TYPE": "Person",
                "born": {
                    "low": 1965,
                    "high": 0
                },
                "name": "Lana Wachowski"
            }
        },
        {
            "id": "7",
            "label": "Person",
            "nodeType": "Person",
            "nodeTypeKeyFromProperties": "GI_TYPE",
            "data": {
                "label": "Person",
                "GI_TYPE": "Person",
                "born": {
                    "low": 1952,
                    "high": 0
                },
                "name": "Joel Silver"
            }
        },
        {
            "id": "8",
            "label": "Person",
            "nodeType": "Person",
            "nodeTypeKeyFromProperties": "GI_TYPE",
            "data": {
                "label": "Person",
                "GI_TYPE": "Person",
                "born": {
                    "low": 1978,
                    "high": 0
                },
                "name": "Emil Eifrem"
            }
        },
        {
            "id": "9",
            "label": "Movie",
            "nodeType": "Movie",
            "nodeTypeKeyFromProperties": "GI_TYPE",
            "data": {
                "label": "Movie",
                "GI_TYPE": "Movie",
                "tagline": "Free your mind",
                "title": "The Matrix Reloaded",
                "released": {
                    "low": 2003,
                    "high": 0
                }
            }
        },
        {
            "id": "10",
            "label": "Movie",
            "nodeType": "Movie",
            "nodeTypeKeyFromProperties": "GI_TYPE",
            "data": {
                "label": "Movie",
                "GI_TYPE": "Movie",
                "tagline": "Everything that has a beginning has an end",
                "title": "The Matrix Revolutions",
                "released": {
                    "low": 2003,
                    "high": 0
                }
            }
        },
        {
            "id": "11",
            "label": "Movie",
            "nodeType": "Movie",
            "nodeTypeKeyFromProperties": "GI_TYPE",
            "data": {
                "label": "Movie",
                "GI_TYPE": "Movie",
                "tagline": "Evil has its winning ways",
                "title": "The Devil's Advocate",
                "released": {
                    "low": 1997,
                    "high": 0
                }
            }
        },
        {
            "id": "12",
            "label": "Person",
            "nodeType": "Person",
            "nodeTypeKeyFromProperties": "GI_TYPE",
            "data": {
                "label": "Person",
                "GI_TYPE": "Person",
                "born": {
                    "low": 1975,
                    "high": 0
                },
                "name": "Charlize Theron"
            }
        },
        {
            "id": "13",
            "label": "Person",
            "nodeType": "Person",
            "nodeTypeKeyFromProperties": "GI_TYPE",
            "data": {
                "label": "Person",
                "GI_TYPE": "Person",
                "born": {
                    "low": 1940,
                    "high": 0
                },
                "name": "Al Pacino"
            }
        }
    ],
    "edges": [
        {
            "id": "0",
            "source": "1",
            "target": "0",
            "label": "ACTED_IN",
            "edgeType": "ACTED_IN",
            "edgeTypeKeyFromProperties": "GI_TYPE",
            "data": {
                "source": "1",
                "target": "0",
                "GI_TYPE": "ACTED_IN",
                "roles": [
                    "Neo"
                ]
            }
        },
        {
            "id": "1",
            "source": "2",
            "target": "0",
            "label": "ACTED_IN",
            "edgeType": "ACTED_IN",
            "edgeTypeKeyFromProperties": "GI_TYPE",
            "data": {
                "source": "2",
                "target": "0",
                "GI_TYPE": "ACTED_IN",
                "roles": [
                    "Trinity"
                ]
            }
        },
        {
            "id": "2",
            "source": "3",
            "target": "0",
            "label": "ACTED_IN",
            "edgeType": "ACTED_IN",
            "edgeTypeKeyFromProperties": "GI_TYPE",
            "data": {
                "source": "3",
                "target": "0",
                "GI_TYPE": "ACTED_IN",
                "roles": [
                    "Morpheus"
                ]
            }
        },
        {
            "id": "3",
            "source": "4",
            "target": "0",
            "label": "ACTED_IN",
            "edgeType": "ACTED_IN",
            "edgeTypeKeyFromProperties": "GI_TYPE",
            "data": {
                "source": "4",
                "target": "0",
                "GI_TYPE": "ACTED_IN",
                "roles": [
                    "Agent Smith"
                ]
            }
        },
        {
            "id": "4",
            "source": "5",
            "target": "0",
            "label": "DIRECTED",
            "edgeType": "DIRECTED",
            "edgeTypeKeyFromProperties": "GI_TYPE",
            "data": {
                "source": "5",
                "target": "0",
                "GI_TYPE": "DIRECTED"
            }
        },
        {
            "id": "5",
            "source": "6",
            "target": "0",
            "label": "DIRECTED",
            "edgeType": "DIRECTED",
            "edgeTypeKeyFromProperties": "GI_TYPE",
            "data": {
                "source": "6",
                "target": "0",
                "GI_TYPE": "DIRECTED"
            }
        },
        {
            "id": "6",
            "source": "7",
            "target": "0",
            "label": "PRODUCED",
            "edgeType": "PRODUCED",
            "edgeTypeKeyFromProperties": "GI_TYPE",
            "data": {
                "source": "7",
                "target": "0",
                "GI_TYPE": "PRODUCED"
            }
        },
        {
            "id": "7",
            "source": "8",
            "target": "0",
            "label": "ACTED_IN",
            "edgeType": "ACTED_IN",
            "edgeTypeKeyFromProperties": "GI_TYPE",
            "data": {
                "source": "8",
                "target": "0",
                "GI_TYPE": "ACTED_IN",
                "roles": [
                    "Emil"
                ]
            }
        },
        {
            "id": "8",
            "source": "1",
            "target": "9",
            "label": "ACTED_IN",
            "edgeType": "ACTED_IN",
            "edgeTypeKeyFromProperties": "GI_TYPE",
            "data": {
                "source": "1",
                "target": "9",
                "GI_TYPE": "ACTED_IN",
                "roles": [
                    "Neo"
                ]
            }
        },
        {
            "id": "9",
            "source": "2",
            "target": "9",
            "label": "ACTED_IN",
            "edgeType": "ACTED_IN",
            "edgeTypeKeyFromProperties": "GI_TYPE",
            "data": {
                "source": "2",
                "target": "9",
                "GI_TYPE": "ACTED_IN",
                "roles": [
                    "Trinity"
                ]
            }
        },
        {
            "id": "10",
            "source": "3",
            "target": "9",
            "label": "ACTED_IN",
            "edgeType": "ACTED_IN",
            "edgeTypeKeyFromProperties": "GI_TYPE",
            "data": {
                "source": "3",
                "target": "9",
                "GI_TYPE": "ACTED_IN",
                "roles": [
                    "Morpheus"
                ]
            }
        },
        {
            "id": "11",
            "source": "4",
            "target": "9",
            "label": "ACTED_IN",
            "edgeType": "ACTED_IN",
            "edgeTypeKeyFromProperties": "GI_TYPE",
            "data": {
                "source": "4",
                "target": "9",
                "GI_TYPE": "ACTED_IN",
                "roles": [
                    "Agent Smith"
                ]
            }
        },
        {
            "id": "12",
            "source": "5",
            "target": "9",
            "label": "DIRECTED",
            "edgeType": "DIRECTED",
            "edgeTypeKeyFromProperties": "GI_TYPE",
            "data": {
                "source": "5",
                "target": "9",
                "GI_TYPE": "DIRECTED"
            }
        },
        {
            "id": "13",
            "source": "6",
            "target": "9",
            "label": "DIRECTED",
            "edgeType": "DIRECTED",
            "edgeTypeKeyFromProperties": "GI_TYPE",
            "data": {
                "source": "6",
                "target": "9",
                "GI_TYPE": "DIRECTED"
            }
        },
        {
            "id": "14",
            "source": "7",
            "target": "9",
            "label": "PRODUCED",
            "edgeType": "PRODUCED",
            "edgeTypeKeyFromProperties": "GI_TYPE",
            "data": {
                "source": "7",
                "target": "9",
                "GI_TYPE": "PRODUCED"
            }
        },
        {
            "id": "15",
            "source": "1",
            "target": "10",
            "label": "ACTED_IN",
            "edgeType": "ACTED_IN",
            "edgeTypeKeyFromProperties": "GI_TYPE",
            "data": {
                "source": "1",
                "target": "10",
                "GI_TYPE": "ACTED_IN",
                "roles": [
                    "Neo"
                ]
            }
        },
        {
            "id": "16",
            "source": "2",
            "target": "10",
            "label": "ACTED_IN",
            "edgeType": "ACTED_IN",
            "edgeTypeKeyFromProperties": "GI_TYPE",
            "data": {
                "source": "2",
                "target": "10",
                "GI_TYPE": "ACTED_IN",
                "roles": [
                    "Trinity"
                ]
            }
        },
        {
            "id": "17",
            "source": "3",
            "target": "10",
            "label": "ACTED_IN",
            "edgeType": "ACTED_IN",
            "edgeTypeKeyFromProperties": "GI_TYPE",
            "data": {
                "source": "3",
                "target": "10",
                "GI_TYPE": "ACTED_IN",
                "roles": [
                    "Morpheus"
                ]
            }
        },
        {
            "id": "18",
            "source": "4",
            "target": "10",
            "label": "ACTED_IN",
            "edgeType": "ACTED_IN",
            "edgeTypeKeyFromProperties": "GI_TYPE",
            "data": {
                "source": "4",
                "target": "10",
                "GI_TYPE": "ACTED_IN",
                "roles": [
                    "Agent Smith"
                ]
            }
        },
        {
            "id": "19",
            "source": "5",
            "target": "10",
            "label": "DIRECTED",
            "edgeType": "DIRECTED",
            "edgeTypeKeyFromProperties": "GI_TYPE",
            "data": {
                "source": "5",
                "target": "10",
                "GI_TYPE": "DIRECTED"
            }
        },
        {
            "id": "20",
            "source": "6",
            "target": "10",
            "label": "DIRECTED",
            "edgeType": "DIRECTED",
            "edgeTypeKeyFromProperties": "GI_TYPE",
            "data": {
                "source": "6",
                "target": "10",
                "GI_TYPE": "DIRECTED"
            }
        },
        {
            "id": "21",
            "source": "7",
            "target": "10",
            "label": "PRODUCED",
            "edgeType": "PRODUCED",
            "edgeTypeKeyFromProperties": "GI_TYPE",
            "data": {
                "source": "7",
                "target": "10",
                "GI_TYPE": "PRODUCED"
            }
        },
        {
            "id": "22",
            "source": "1",
            "target": "11",
            "label": "ACTED_IN",
            "edgeType": "ACTED_IN",
            "edgeTypeKeyFromProperties": "GI_TYPE",
            "data": {
                "source": "1",
                "target": "11",
                "GI_TYPE": "ACTED_IN",
                "roles": [
                    "Kevin Lomax"
                ]
            }
        },
        {
            "id": "23",
            "source": "12",
            "target": "11",
            "label": "ACTED_IN",
            "edgeType": "ACTED_IN",
            "edgeTypeKeyFromProperties": "GI_TYPE",
            "data": {
                "source": "12",
                "target": "11",
                "GI_TYPE": "ACTED_IN",
                "roles": [
                    "Mary Ann Lomax"
                ]
            }
        },
        {
            "id": "24",
            "source": "13",
            "target": "11",
            "label": "ACTED_IN",
            "edgeType": "ACTED_IN",
            "edgeTypeKeyFromProperties": "GI_TYPE",
            "data": {
                "source": "13",
                "target": "11",
                "GI_TYPE": "ACTED_IN",
                "roles": [
                    "John Milton"
                ]
            }
        }
    ],
    "table": {
        "headers": [],
        "rows": []
    }
}

from g6vp.

nylqd avatar nylqd commented on May 27, 2024
image

another simple example here MATCH p=()-->() RETURN p LIMIT 2

{
    "nodes": [
        {
            "id": "1",
            "label": "Person",
            "nodeType": "Person",
            "nodeTypeKeyFromProperties": "GI_TYPE",
            "data": {
                "label": "Person",
                "GI_TYPE": "Person",
                "born": {
                    "low": 1964,
                    "high": 0
                },
                "name": "Keanu Reeves"
            }
        },
        {
            "id": "0",
            "label": "Movie",
            "nodeType": "Movie",
            "nodeTypeKeyFromProperties": "GI_TYPE",
            "data": {
                "label": "Movie",
                "GI_TYPE": "Movie",
                "tagline": "Welcome to the Real World",
                "title": "The Matrix",
                "released": {
                    "low": 1999,
                    "high": 0
                }
            }
        },
        {
            "id": "2",
            "label": "Person",
            "nodeType": "Person",
            "nodeTypeKeyFromProperties": "GI_TYPE",
            "data": {
                "label": "Person",
                "GI_TYPE": "Person",
                "born": {
                    "low": 1967,
                    "high": 0
                },
                "name": "Carrie-Anne Moss"
            }
        }
    ],
    "edges": [
        {
            "id": "0",
            "source": "1",
            "target": "0",
            "label": "ACTED_IN",
            "edgeType": "ACTED_IN",
            "edgeTypeKeyFromProperties": "GI_TYPE",
            "data": {
                "source": "1",
                "target": "0",
                "GI_TYPE": "ACTED_IN",
                "roles": [
                    "Neo"
                ]
            }
        },
        {
            "id": "1",
            "source": "2",
            "target": "0",
            "label": "ACTED_IN",
            "edgeType": "ACTED_IN",
            "edgeTypeKeyFromProperties": "GI_TYPE",
            "data": {
                "source": "2",
                "target": "0",
                "GI_TYPE": "ACTED_IN",
                "roles": [
                    "Trinity"
                ]
            }
        }
    ],
    "table": {
        "headers": [],
        "rows": []
    }
}

from g6vp.

nylqd avatar nylqd commented on May 27, 2024

@pomelo-nwu
It seems like the issue stems from duplicate IDs between edges and nodes, leading to complications in the rendering process. I've considered a possible solution, specifically within the processResult method.

image

My suggestion involves making slight modifications to the IDs of edges, perhaps by adding a distinctive prefix. This adjustment aims to mitigate conflicts and enhance the uniqueness of identifiers, potentially resolving the rendering anomalies.

image image

id: identity.low.toString(),

id: identity.low.toString(),

from g6vp.

pomelo-nwu avatar pomelo-nwu commented on May 27, 2024

@nylqd Great job! Feel free to submit a pull request

from g6vp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.