Coder Social home page Coder Social logo

Comments (7)

jesusalber1 avatar jesusalber1 commented on June 13, 2024

First, you need to know the node that has been clicked by implementing either the onNodeClick or onNodeDoubleClick functions when you initialize neo4jd3. Then, inside one of those functions, you can perform an AJAX request to your server and update the graph with the updateWithNeo4jData function.

from neo4jd3.

veerareddyakkili avatar veerareddyakkili commented on June 13, 2024

if you have sample, can you send me pls

from neo4jd3.

jesusalber1 avatar jesusalber1 commented on June 13, 2024

onNodeClick example
Just add the function as another property of the object.
Not tested.

from neo4jd3.

veerareddyakkili avatar veerareddyakkili commented on June 13, 2024

How to get data from Neo4j server initially. is there any way we can do without chnanging the code like using options.neo4jDataUrl.

from neo4jd3.

jesusalber1 avatar jesusalber1 commented on June 13, 2024

Actually by implementing options.onNodeClick you're not changing the code but adding a custom functionality through the options, the core remains the same.

Alternatively, you can use options.neo4jDataUrl (URL to a json) to get your data from the server initially. In any case, if you want to get new data when a node is clicked, you need to implement options.onNodeClick.

If you still have doubts, share some code to help understand what you need exactly.

from neo4jd3.

veerareddyakkili avatar veerareddyakkili commented on June 13, 2024

We want to display all relations first and when we click on relation it has to all the nodes. All this info we should read it from neo4j server.

from neo4jd3.

jesusalber1 avatar jesusalber1 commented on June 13, 2024

I'm not sure if you can display a relationship without both startNode and endNode, but I think it's not possible... What you can do instead is to get all the nodes the first time and then use css to hide some of them. In this way, you'll be able to unhide them again easily when clicking the relationship.

from neo4jd3.

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.