{"action":"created","issue":{"url":"https://api.github.com/repos/jacomyal/sigma.js/issues/581","labels_url":"https://api.github.com/repos/jacomyal/sigma.js/issues/581/labels{/name}","comments_url":"https://api.github.com/repos/jacomyal/sigma.js/issues/581/comments","events_url":"https://api.github.com/repos/jacomyal/sigma.js/issues/581/events","html_url":"https://github.com/jacomyal/sigma.js/issues/581","id":82899316,"number":581,"title":"How to set sigma settings for the sigma GEXF parser?","user":{"login":"ypanagis","id":2759302,"avatar_url":"https://avatars.githubusercontent.com/u/2759302?v=3","gravatar_id":"","url":"https://api.github.com/users/ypanagis","html_url":"https://github.com/ypanagis","followers_url":"https://api.github.com/users/ypanagis/followers","following_url":"https://api.github.com/users/ypanagis/following{/other_user}","gists_url":"https://api.github.com/users/ypanagis/gists{/gist_id}","starred_url":"https://api.github.com/users/ypanagis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ypanagis/subscriptions","organizations_url":"https://api.github.com/users/ypanagis/orgs","repos_url":"https://api.github.com/users/ypanagis/repos","events_url":"https://api.github.com/users/ypanagis/events{/privacy}","received_events_url":"https://api.github.com/users/ypanagis/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-05-30T20:02:01Z","updated_at":"2015-06-22T08:24:26Z","closed_at":null,"body":"I followed the sigma.js [tutorial](http://sigmajs.org/#tutorial) and tried to modify the original example and play around with setting the settings and more specifically setting arrow types. \r\n```javascript\r\n  sigma.parsers.gexf('miserables.gexf', {  \r\n    renderer: {\r\n    container: document.getElementById('container'),\r\n    type: 'canvas'\r\n  },\r\n  settings: {\r\n      edgeColor: 'source',\r\n      defaultEdgeType: 'directed'\r\n    }\r\n  },\r\nfunction(s){\r\n//continues with the code that presents the neighbours of the node that was clicked\r\n}\r\n```\r\nI see though that providing settings from here has no effect to the graph. If I however change the settings from within ``function(s)`` by writing something like\r\n```javascript\r\n      s.graph.edges().forEach(function(e) {\r\n        e.originalColor = e.color;   //store original color for later use\r\n        e.type = \"arrow\";               //tada! code added here\r\n      });\r\n```\r\nthen this indeed affects the drawing of the graph and draws arrows in the direction of the edges. \r\n\r\nMy question is if what is the appropriate way to set the settings, after having loaded a graph with one of the parsers."},"comment":{"url":"https://api.github.com/repos/jacomyal/sigma.js/issues/comments/114037560","html_url":"https://github.com/jacomyal/sigma.js/issues/581#issuecomment-114037560","issue_url":"https://api.github.com/repos/jacomyal/sigma.js/issues/581","id":114037560,"user":{"login":"Yomguithereal","id":2571951,"avatar_url":"https://avatars.githubusercontent.com/u/2571951?v=3","gravatar_id":"","url":"https://api.github.com/users/Yomguithereal","html_url":"https://github.com/Yomguithereal","followers_url":"https://api.github.com/users/Yomguithereal/followers","following_url":"https://api.github.com/users/Yomguithereal/following{/other_user}","gists_url":"https://api.github.com/users/Yomguithereal/gists{/gist_id}","starred_url":"https://api.github.com/users/Yomguithereal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yomguithereal/subscriptions","organizations_url":"https://api.github.com/users/Yomguithereal/orgs","repos_url":"https://api.github.com/users/Yomguithereal/repos","events_url":"https://api.github.com/users/Yomguithereal/events{/privacy}","received_events_url":"https://api.github.com/users/Yomguithereal/received_events","type":"User","site_admin":false},"created_at":"2015-06-22T08:24:26Z","updated_at":"2015-06-22T08:24:26Z","body":"Hello @ypanagis, I think I opened a bug concerning this particular issue but cannot find it anymore. What you can try is pass an already existing sigma instance to the parser rather than a settings object. You could also try to change the settings on the fly:\r\n\r\n```js\r\n// Passing an instance to the parser\r\nvar s = new sigma(...);\r\nsigma.parsers.gexf('graph.gexf', s, callback);\r\n\r\n// Changing settings\r\ns.settings('defaultEdgeType', 'arrow');\r\n```"}}