Refactor BarChart component.
This commit is contained in:
1 parent
4618dc7f15
commit
d936ecc86e
3 files changed
+73
-63
No files matched your search
@@ -113,3 +113,8 @@ export function getDateArray(data, startDate, endDate, unit) {
|
||||
|
||||
return arr;
|
||||
}
|
||||
|
||||
export function getDateLength(startDate, endDate, unit) {
|
||||
const [diff] = dateFuncs[unit];
|
||||
return diff(endDate, startDate) + 1;
|
||||
}
|
||||
Reference in new issue
Block a user