Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@vongillern
vongillern / README.md
Last active December 17, 2015 07:58 — forked from christophermanning/README.md
General Update Pattern III with d3 contributors, fixed key function

Forked from: http://bl.ocks.org/christophermanning/3809302 (which was forked from: http://bl.ocks.org/mbostock/3808234).

I really liked this transition for the names of d3 contributors, however, occasionally you'd see some odd artifacts caused by a name having one instance of a letter, but the new/entering name had two or more instances of the same letter. This was caused by the key function for the data looking at the letter and only the letter. I've swapped out the key function and done some mapping to give each letter a unique key (the letter, plus the occurance of the letter upto that point in the name).

for the name bob loblaw the key for each letter is as follows:

b: b~1

o: o~1