better memory management in bar chart, plus better date rounding