Learn to write d3 plugin