Please share the HTML of your JSP.

I can't help with vague snippets ...

M

> Am 04.02.2015 um 23:46 schrieb Arvind Upadhyay <[email protected]>:
> 
> This is what i do
> 
> i have a jsp with an empty div graph. on the client side(i also use other 
> javascripts library like masonary.js,datatables and jquery), i load the doc, 
> make ajax call get the data (from neo4j in a graphical centric) and then try 
> to display using the code i pasted in previous conversation.
> 
> On Wed, Feb 4, 2015 at 5:31 PM, Michael Hunger 
> <[email protected] <mailto:[email protected]>> 
> wrote:
> can you share your full html document?
> 
> M
> 
>> Am 04.02.2015 um 17:09 schrieb Arvind Upadhyay <[email protected] 
>> <mailto:[email protected]>>:
>> 
>> One more thing
>> 
>> if you try to override the response from server side in your working app 
>> var graph = 
>> {"nodes":[{name:"Peter",label:"Person",id:1},{name:"Michael",label:"Person",id:2},
>>                                                                
>> {name:"Neo4j",label:"Database",id:3}],
>>                                                       "links":[{start:0, 
>> end:1, type:"KNOWS", since:2010},{start:0, end:2, type:"FOUNDED"},
>>                                                                {start:1, 
>> end:2, type:"WORKS_ON"}]};
>> 
>> you might get the same error. Is this something related to the format of 
>> data ?
>> 
>>              
>> 
>> On Wed, Feb 4, 2015 at 9:36 AM, Arvind Upadhyay <[email protected] 
>> <mailto:[email protected]>> wrote:
>> i checked the version but no luck. I am sure i am missing somthing...not 
>> sure whr though?
>> in my html i have an empty div with dependencyMgmt as the id.
>> 
>> On Tue, Feb 3, 2015 at 5:40 PM, Michael Hunger 
>> <[email protected] <mailto:[email protected]>> 
>> wrote:
>> Could you try to use the d3 version that we use here:
>> 
>> https://github.com/neo4j-contrib/developer-resources/blob/gh-pages/language-guides/assets/index.html#L87
>>  
>> <https://github.com/neo4j-contrib/developer-resources/blob/gh-pages/language-guides/assets/index.html#L87>
>> http://d3js.org/d3.v3.min.js <http://d3js.org/d3.v3.min.js>
>> 
>> In action: http://my-neo4j-movies-app.herokuapp.com/ 
>> <http://my-neo4j-movies-app.herokuapp.com/>
>> 
>> Michael
>> 
>>> Am 03.02.2015 um 21:29 schrieb Arvind Upadhyay <[email protected] 
>>> <mailto:[email protected]>>:
>>> 
>>> 
>>> hello guys, this question is more d3 centric than neo4j based. I copied the 
>>> example from neo4j website for visualization and it does not seem to work.
>>> 
>>> I am using latest version of d3.js to prototype visualization using neo4j.
>>>  Error seems to be from d3.js library itself
>>>  Uncaught TypeError: Cannot read property 'weight' of undefined d3.min.js:4
>>> 
>>> 
>>> here is the code i copied from neo4j site ("dependencyManager" is the id of 
>>> svg element)
>>> 
>>> 
>>>  res = 
>>> {"nodes":[{name:"Peter",label:"Person",id:1},{name:"Michael",label:"Person",id:2},
>>>                                                                
>>> {name:"Neo4j",label:"Database",id:3}],
>>>                                                       "links":[{start:0, 
>>> end:1, type:"KNOWS", since:2010},{start:0, end:2, type:"FOUNDED"},
>>>                                                                {start:1, 
>>> end:2, type:"WORKS_ON"}]};
>>>                                                                             
>>>                                 
>>> 
>>>                                                     var graph = 
>>> {"nodes":[{name:"Peter",label:"Person",id:1},{name:"Michael",label:"Person",id:2},
>>>                                                               
>>> {name:"Neo4j",label:"Database",id:3}],
>>>                                                      "links":[{start:0, 
>>> end:1, type:"KNOWS", since:2010},{start:0, end:2, type:"FOUNDED"},
>>>                                                               {start:1, 
>>> end:2, type:"WORKS_ON"}]};
>>> 
>>>                                                      var width = 800, 
>>> height = 800;
>>>                                                     // force layout setup
>>>                                                     var force = 
>>> d3.layout.force()
>>>                                                             
>>> .charge(-200).linkDistance(30).size([width, height]);
>>> 
>>>                                                     // setup svg div
>>>                                                     var svg = 
>>> d3.select("#dependencyManager")
>>>                                                             .attr("width", 
>>> "100%").attr("height", "100%")
>>>                                                             
>>> .attr("pointer-events", "all");
>>> 
>>>                                                     // load graph 
>>> (nodes,links) json from /graph endpoint
>>>                                                     
>>>                                                        
>>> 
>>>                                                         
>>> force.nodes(graph.nodes).links(graph.links).start();
>>> 
>>>                                                         // render 
>>> relationships as lines
>>>                                                         var link = 
>>> svg.selectAll(".link")
>>>                                                                 
>>> .data(graph.links).enter()
>>>                                                                 
>>> .append("line").attr("class", "link");
>>> 
>>>                                                         // render nodes as 
>>> circles, css-class from label
>>>                                                         var node = 
>>> svg.selectAll(".node")
>>>                                                                 
>>> .data(graph.nodes).enter()
>>>                                                                 
>>> .append("circle")
>>>                                                                 
>>> .attr("class", function (d) { return "node "+d.label })
>>>                                                                 .attr("r", 
>>> 10)
>>>                                                                 
>>> .call(force.drag);
>>> 
>>>                                                         // html title 
>>> attribute for title node-attribute
>>>                                                         node.append("title")
>>>                                                                 
>>> .text(function (d) { return d.title; })
>>> 
>>>                                                         // force feed algo 
>>> ticks for coordinate computation
>>>                                                         force.on("tick", 
>>> function() {
>>>                                                             link.attr("x1", 
>>> function(d) { return d.source.x; })
>>>                                                                     
>>> .attr("y1", function(d) { return d.source.y; })
>>>                                                                     
>>> .attr("x2", function(d) { return d.target.x; })
>>>                                                                     
>>> .attr("y2", function(d) { return d.target.y; });
>>> 
>>>                                                             node.attr("cx", 
>>> function(d) { return d.x; })
>>>                                                                     
>>> .attr("cy", function(d) { return d.y; });
>>>                                                         });
>>> 
>>> -- 
>>> You received this message because you are subscribed to the Google Groups 
>>> "Neo4j" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an 
>>> email to [email protected] 
>>> <mailto:[email protected]>.
>>> For more options, visit https://groups.google.com/d/optout 
>>> <https://groups.google.com/d/optout>.
>> 
>> 
>> -- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "Neo4j" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/neo4j/REh1ZJnU80s/unsubscribe 
>> <https://groups.google.com/d/topic/neo4j/REh1ZJnU80s/unsubscribe>.
>> To unsubscribe from this group and all its topics, send an email to 
>> [email protected] 
>> <mailto:[email protected]>.
>> For more options, visit https://groups.google.com/d/optout 
>> <https://groups.google.com/d/optout>.
>> 
>> 
>> 
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Neo4j" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] 
>> <mailto:[email protected]>.
>> For more options, visit https://groups.google.com/d/optout 
>> <https://groups.google.com/d/optout>.
> 
> 
> -- 
> You received this message because you are subscribed to a topic in the Google 
> Groups "Neo4j" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/neo4j/REh1ZJnU80s/unsubscribe 
> <https://groups.google.com/d/topic/neo4j/REh1ZJnU80s/unsubscribe>.
> To unsubscribe from this group and all its topics, send an email to 
> [email protected] 
> <mailto:[email protected]>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Neo4j" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] 
> <mailto:[email protected]>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to