novus/nvd3 — pull request #661 by sylvinus (2014-09-10 00:27:16+00:00)
Title: Fix broken legend when data is changed

Not a d3/nvd3 expert, but this is needed to make my custom legend behave (it uses dynamically-generated legend data, not directly the main graph's data).

This should (admittedly not the ideal way) fix errors some other users have also been getting:
http://stackoverflow.com/questions/23015095/nvd3-passing-wrong-event-on-statechange-when-clicking-legend-after-chart-is-re
("data always points to the initial data array").