dendogram.js rewritten to provide an example of how graph classes could be turned into reusable charts