GraphAlchemist / Alchemy

Other
515 stars 234 forks source link

alchemy.createNodes isn't a function #571

Open pureexe opened 9 years ago

pureexe commented 9 years ago

my source code

var config = {
    dataSource: 'data.json',
    backgroundColor: 'transparent',
    graphHeight: function(){ return $("#knowledgegraph").height(); },
    graphWidth: function(){ return $("#knowledgegraph").width(); },
    linkDistance: function(){ return 40; },
};
var alchemy = new Alchemy(config);
$("#knowledgegraph").dblclick(function(){
    var nodeId = Math.floor(Math.random()*10000);
     alchemy.createNodes({
         caption:"This is a new node",
         id:nodeId
      });
});

PS. Graph render is work fine.

watho commented 8 years ago

Try alchemy.create.nodes()

CharlesCousyn commented 4 years ago

Does someone has the fix for this?? alchemy.create.nodes({id:42, caption:"hello"}) does not seem to work...