work in progress yet another re-write of the d3 charts, this time in pure d3.js