Hacker News new | past | comments | ask | show | jobs | submit login

I find that D3 is great, but it needs an abstraction for the general update pattern (https://bl.ocks.org/mbostock/3808218).

I did that! One function that receives actions for update, create, delete, etc. Now my code is easier to read. Check the function gupChildren (AKA: General update pattern for child nodes of a selection) in my code, and feel free to use it: https://bitbucket.org/aurelito/sandro-lib/src/83b81c4b556848...

At last, unless you understand what you are doing, use selectAll and no select.

Cheers!




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: