mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 04:37:11 +01:00
Refactor BarChart component.
This commit is contained in:
parent
4618dc7f15
commit
d936ecc86e
3 changed files with 73 additions and 63 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue