Fix date function.

pull/1873/head
Brian Cao 2023-04-04 00:24:03 -07:00
parent 76296bc2ee
commit dee58f8a55
1 changed files with 2 additions and 2 deletions

View File

@ -181,8 +181,8 @@ export function getDateArray(data, startDate, endDate, unit) {
const n = diff(endDate, startDate) + 1;
function findData(date) {
const d = data.find(({ t }) => {
return normalize(getDateFromString(t)).getTime() === date.getTime();
const d = data.find(({ x, t }) => {
return normalize(getDateFromString(x || t)).getTime() === date.getTime();
});
return d?.y || 0;