db-dashboard
db-dashboard copied to clipboard
col_plot.js "d" transition update
On transition after clicking on "group_totals" to get the daily breakdown, if your data has a gap between days, e.g. no data for the 3rd to the 6th, your "d" attributes will be out of sync after that gap until after the nth column, n being the number of columns before transition (or on enter). E.g. The 4th column, day 6 will have a "d" value of 4, day 7 will have a "d" value of 5 etc until 13 where the new elements begin.
I added .attr('d', function(d) { return d.x; });
to the cols.transition()
section to fix this.