{"action":"created","issue":{"url":"https://api.github.com/repos/tomshanley/d3-sankey-circular/issues/20","repository_url":"https://api.github.com/repos/tomshanley/d3-sankey-circular","labels_url":"https://api.github.com/repos/tomshanley/d3-sankey-circular/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/tomshanley/d3-sankey-circular/issues/20/comments","events_url":"https://api.github.com/repos/tomshanley/d3-sankey-circular/issues/20/events","html_url":"https://github.com/tomshanley/d3-sankey-circular/issues/20","id":327950273,"node_id":"MDU6SXNzdWUzMjc5NTAyNzM=","number":20,"title":"Update existing graph with new values","user":{"login":"tomshanley","id":7007620,"node_id":"MDQ6VXNlcjcwMDc2MjA=","avatar_url":"https://avatars0.githubusercontent.com/u/7007620?v=4","gravatar_id":"","url":"https://api.github.com/users/tomshanley","html_url":"https://github.com/tomshanley","followers_url":"https://api.github.com/users/tomshanley/followers","following_url":"https://api.github.com/users/tomshanley/following{/other_user}","gists_url":"https://api.github.com/users/tomshanley/gists{/gist_id}","starred_url":"https://api.github.com/users/tomshanley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomshanley/subscriptions","organizations_url":"https://api.github.com/users/tomshanley/orgs","repos_url":"https://api.github.com/users/tomshanley/repos","events_url":"https://api.github.com/users/tomshanley/events{/privacy}","received_events_url":"https://api.github.com/users/tomshanley/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-31T00:40:18Z","updated_at":"2018-05-31T00:52:32Z","closed_at":null,"author_association":"OWNER","body":"Currently, if a graph (similar nodes, links) is updated with new values, it may (small probability) result in a sankey where the nodes are in different positions, which makes it harder for the user to compare changes across different versions. Also, it would involve calling the sankey function again, which would involve a lot of unecessary calculations, which increases the time between updates."},"comment":{"url":"https://api.github.com/repos/tomshanley/d3-sankey-circular/issues/comments/393366150","html_url":"https://github.com/tomshanley/d3-sankey-circular/issues/20#issuecomment-393366150","issue_url":"https://api.github.com/repos/tomshanley/d3-sankey-circular/issues/20","id":393366150,"node_id":"MDEyOklzc3VlQ29tbWVudDM5MzM2NjE1MA==","user":{"login":"tomshanley","id":7007620,"node_id":"MDQ6VXNlcjcwMDc2MjA=","avatar_url":"https://avatars0.githubusercontent.com/u/7007620?v=4","gravatar_id":"","url":"https://api.github.com/users/tomshanley","html_url":"https://github.com/tomshanley","followers_url":"https://api.github.com/users/tomshanley/followers","following_url":"https://api.github.com/users/tomshanley/following{/other_user}","gists_url":"https://api.github.com/users/tomshanley/gists{/gist_id}","starred_url":"https://api.github.com/users/tomshanley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomshanley/subscriptions","organizations_url":"https://api.github.com/users/tomshanley/orgs","repos_url":"https://api.github.com/users/tomshanley/repos","events_url":"https://api.github.com/users/tomshanley/events{/privacy}","received_events_url":"https://api.github.com/users/tomshanley/received_events","type":"User","site_admin":false},"created_at":"2018-05-31T00:52:32Z","updated_at":"2018-05-31T00:52:32Z","author_association":"OWNER","body":"Proposal to create a function on the sankey object that updates an existing graph with new link values. It won't create new links/nodes (ie assume that is only updating nodes/links that already exist).  Values could be set to 0, which would effectively hide the node or link, and the user could decide to filter those out afterwards.\r\n\r\nThe function would take a graph which was generated from sankey, along with an array of new links (using the same ID).  Any new IDs are ignored.   \r\n\r\n1.\tSum link values per node\r\n2.\tMatch node values to current nodes.  Anything with no new value set to 0\r\n3.\tMatch link values to current links\r\n4.\tUpdate node Y0, Y1, value, height. Use Current value to height ratio should be used for creating the new heights. Shift any over laps slightly, but keep same order top to bottom\r\n5.\tUpdate link y for each node\r\n6.\tRecalculate link paths\r\n7.\tReturn graph\r\n\r\nIf values are increasing, it would work best if there is adequate padding in place from the first generated sankey, but this can be trialled by the user, on nodePaddingRatio\r\n"}}
{"actor":{"display_login":"tomshanley"}}