First of all, thanks for making such an awesome tool, this is great!
I'm building a site using neovis, and I was wondering if there was a way to add nodes and edges using a cypher query instead of having to re-render the entire graph every time. Specifically, on my site, I'd like the user to be able to expand the connections a node has by double-clicking on it, rather than having to select all desired nodes and press "Update Graph with Selection." I'd also like the nodes already visible to stay in place—whereas re-rendering the graph messes with their current positions.
The only way I see being able to implement this currently is by using the vis.js data methods, but then I think I would have to open another/separate connection to my database to get the data in the right format for the data.add() method? From the docs:
// add items
// note that the data items can contain different properties and data formats
data.add([
{id: 1, text: 'item 1', date: new Date(2013, 6, 20), group: 1, first: true},
{id: 2, text: 'item 2', date: '2013-06-23', group: 2},
{id: 3, text: 'item 3', date: '2013-06-25', group: 2},
{id: 4, text: 'item 4'}
]);
Would it be possible to implement a method like updateWithCypher(query) to add the retrieved nodes + edges to existing nodes? Or is there any better work-around or possible solution for this? Thanks in advance!
Hi,
First of all, thanks for making such an awesome tool, this is great!
I'm building a site using neovis, and I was wondering if there was a way to add nodes and edges using a cypher query instead of having to re-render the entire graph every time. Specifically, on my site, I'd like the user to be able to expand the connections a node has by double-clicking on it, rather than having to select all desired nodes and press "Update Graph with Selection." I'd also like the nodes already visible to stay in place—whereas re-rendering the graph messes with their current positions.
The only way I see being able to implement this currently is by using the vis.js data methods, but then I think I would have to open another/separate connection to my database to get the data in the right format for the data.add() method? From the docs:
Would it be possible to implement a method like
updateWithCypher(query)
to add the retrieved nodes + edges to existing nodes? Or is there any better work-around or possible solution for this? Thanks in advance!