How to run hello using neo4j_nvl to show graph?

Hi

I am creating hello program using neo4j_nvl.

I found https://neo4j.com/docs/api/nvl/current/ .

However interaction-hendlers are deprecated and does not exist in npm any more.

Is there any link to run any latest hello program to use neo4j_nvl?

I want to show graph visualization and expand relationship by clicking the node to show broader relationsship.

Hello @dyim!
You can find the interaction handlers here and they are not deprecated https://www.npmjs.com/package/@neo4j-nvl/interaction-handlers

If you want to check out an example with the interaction handlers see here

import NVL from '@neo4j-nvl/base'
import {
ClickInteraction,
DragNodeInteraction,
HoverInteraction,
PanInteraction,
ZoomInteraction
} from '@neo4j-nvl/interaction-handlers'

export default (parentContainer) => {
const nodes = [{ id: '0' }, { id: '1' }]
const rels = [{ id: '10', from: '0', to: '1' }]
const myNvl = new NVL(parentContainer, nodes, rels)

new ZoomInteraction(myNvl)
new PanInteraction(myNvl)
new DragNodeInteraction(myNvl)
new ClickInteraction(myNvl, { selectOnClick: true })
new HoverInteraction(myNvl, { drawShadowOnHover: true })

return myNvl
}

If you're using React an alternative is using InteractiveNvlWrapper which handle the interaction handlers on its own.

If instead you want a basic boilerplate for a project with NVL feel free to check out GitHub - neo4j-devtools/nvl-boilerplates: Template projects to get started with the Neo4j Visualization Library (NVL) · GitHub

@claudio.gallina

Thank you for introduction of boilertemplate.

There is no detail steps to use it . Do you know some plan to provide detail steps?

@dyim

Here's a quick guide on how to get a boilerplate running.

  1. choose which boilerplate you want to use (e.g. plain/javascript/webpack/)
  2. copy the contents of that folder into the folder where you want to run the project
  3. run npm install and then npm run start
  4. the NVL app will be hosted on a port on localhost

Hope this helps. Let me know how you get on and if you have any more questions.

@clemens.anzmann Thank you for the response.

I could run plain bolierplate.

How can I see more dynamic graph?

I want to show the graph ( based on the result of Neo4j cypher Neo4j ). When I click the node , the node bring more relationships from the neo4j.

I could see clicking and expand relations and nodes in neo4j desktop.

I want to provide this functionality for my GraphRAG implementation.

Is dynamic graph displaying possible ?