score:1
Accepted answer
I've investigated your code a bit and found two mistakes you made:
1) In the code below you're creating array of nodes that lose touch with a
, b
and c
objects
var a = { id: "a" },
b = { id: "b" },
c = { id: "c" },
links = [];
var nodes = [{ id: "a" }, { id: "b" }, { id: "c" }];
You need to keep the same reference in array to the original objects:
var nodes = [a, b, c];
2) You set two wrong delay:
d3.interval(function () {
nodes.pop(); // Remove c.
links.pop(); // Remove c-a.
links.pop(); // Remove b-c.
restart();
}, 4000, d3.now());
^^^^^
should be 2000 as in original example
Source: stackoverflow.com
Related Query
- d3 Update Example in Typescript - Scoping Issue?
- d3 events issue with angular 2 typescript
- security issue reproducing d3.js example at home
- attrTween typescript issue
- Issue with getting a 'foreignObject` d3v3 example to work in d3v4
- Angular 2 D3 drag function scoping issue
- D3 Chord Example Hover Issue in IE11
- d3 - nested selections/sub-item update issue
- Wordcloud update data/ working example of adding words to cloud?
- D3 updating bar chart with new data set cause update issue
- Line chart Dot update issue in D3
- D3.js - Issue creating normalised stacked bar chart using example function on Obsevablehq
- Error in compiling the d3 example using typescript
- Issue adding labels to edges in “Group/Bundle Nodes” D3 force layout example
- How to update axis using d3.js
- d3 update data and update graph
- Dynamically update chart data in D3
- A simple scatterplot example in D3.js?
- Setting an id issue in d3
- D3: update data with multiple elements in a group
- How to update elements of D3 force layout when the underlying data changes
- How to update an svg path with d3.js
- Update the y-axis of a brushed area chart
- Can Typescript import CommonJS Modules?
- What is the best way to update d3 charts using - AJAX
- d3.js and TypeScript compilation error
- d3.js rewriting zoom example in version4
- Implementing the D3 "reusable chart" pattern in TypeScript
- How to embed a d3.js example to the Jekyll blog post?
- Concept Map Network - Node Issue
More Query from same tag
- D3,js graph dashboard conversion to png/jpg/pdf
- d3.js NVD3 trigger tooltip manually
- visjs.org library : display only event dates
- d3v4 - zooming (Equivalent to d3.zoom.x)
- Angular D3js links not are displaying
- Color Specific Links on D3 Sankey Chart
- Move position of tree using javascript d3
- Customize single coordinate in d3.layout.tree()
- d3.js how to get minimum value of scale's domain when using nice()
- .onmousedown executing on page load
- Can we use Google Fusion tables as data source for making a visualization using d3.js?
- Placing text at center of rectangle
- Why click event on d3.js resuable chart creating problem?
- How do I format an integer as a time using D3.js or nvD3.js
- d3.js and Sankey diagram error
- Line() in d3 generating NaN
- remove element in d3.js
- Changing position of d3 svg box in browser window
- How to create SVG shapes based on data?
- d3.js Adding elements to pie chart
- D3 managing multiple classes for multiple chart labels
- Swapping event handlers between DOM elements d3
- Why is there whitespace / "overlap" between rect elements where there shouldn't be?
- Line chart from external csv-file
- How can I make double click event on node in d3.js?
- Trying to create a line chart with a linear x-axis, like the time axis, but with numerical data, in DimpleJS
- How does d3 V4 d3.stratify work with a tree?
- Generating visually pleasing circle pack
- Most efficient access to the rightmost/leftmost cousin node in a d3 tree
- Integrate data in html for Parallel Coordinates visualization in D3