Customized implementation of the d3 library. Changes from normal are extensive