Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var svg = d3.select("div.div1").append("svg")
- .attr('width', width)
- .attr('height', height)
- simulation = d3.forceSimulation()
- .force('link', d3.forceLink()
- .id(function (link) { return link.id })
- .distance(function (link) { return link.propertyObj.distance })
- .strength(function (link) { return link.propertyObj.strength })
- )
- .force('charge', d3.forceManyBody().strength(-45))
- .force('center', d3.forceCenter(width / 3, height / 1.90))
- d3.selectAll("svg > *").remove();
- simulation.nodes(nodes).on('tick', ticked);
- simulation.force("link").links(links);
- d3.selectAll("svg > *").remove();
Add Comment
Please, Sign In to add comment