Fix date range calculations (end date is inclusive for aggregates).
Return null for undefined layer data, so we can still treat as a number (Number(null) === 0) but test and exclude from charts (e.g. break up sum line into segments).
Fix end date calculation.