diff options
author | Peter Wu <peter@lekensteyn.nl> | 2014-05-21 22:16:57 +0200 |
---|---|---|
committer | Peter Wu <peter@lekensteyn.nl> | 2014-05-21 22:16:57 +0200 |
commit | 5aa55560afbeb4c36778e40bf676ecd252a62b8f (patch) | |
tree | 2079b8c4e06985a63d821e3d0ddd11a44cae9994 /js | |
parent | 47238c16d89e69fbb540e8869ba11e6ae47183f4 (diff) | |
download | d3viz-5aa55560afbeb4c36778e40bf676ecd252a62b8f.tar.gz |
Fix key for initial nodes
By default, an array key is used. That could cause problems for
detecting the data join, so use the userid as unique identifier (this
is also done when detecting updating spam statuses).
Diffstat (limited to 'js')
-rw-r--r-- | js/spam.js | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -164,7 +164,9 @@ function processData(data) { /* nodes */ var node = contents.append('g').selectAll('circle') - .data(force.nodes()) + .data(force.nodes(), function (d) { + return d.userid; + }) .enter().append('circle') .attr('class', getNodeClasses) .attr('r', function (d) { |