GraphAlchemist / Alchemy

Other
517 stars 234 forks source link

alchemy.createNodes isn't a function #571

Open pureexe opened 8 years ago

pureexe commented 8 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 3 years ago

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