diff --git a/lib/date.js b/lib/date.js index 38e1cc61..d86efcd8 100644 --- a/lib/date.js +++ b/lib/date.js @@ -180,9 +180,9 @@ export function getDateArray(data, startDate, endDate, unit) { const [diff, add, normalize] = dateFuncs[unit]; const n = diff(endDate, startDate) + 1; - function findData(t) { - const d = data.find(({ x }) => { - return normalize(getDateFromString(x)).getTime() === t.getTime(); + function findData(date) { + const d = data.find(({ t }) => { + return normalize(getDateFromString(t)).getTime() === date.getTime(); }); return d?.y || 0;