fix overlapping ranges in histograms
It's bin.x0 <= x < bin.x1
This commit is contained in:
parent
7a08970bf7
commit
05302e6c2f
@ -49,7 +49,7 @@ export function intervalLabel(
|
||||
// range
|
||||
return i18n.tr(i18n.TR.STATISTICS_INTERVALS_DAY_RANGE, {
|
||||
daysStart,
|
||||
daysEnd,
|
||||
daysEnd: daysEnd - 1,
|
||||
cards,
|
||||
});
|
||||
}
|
||||
|
@ -146,11 +146,14 @@ export function dayLabel(i18n: I18n, daysStart: number, daysEnd: number): string
|
||||
} else {
|
||||
// range
|
||||
if (daysStart >= 0) {
|
||||
return i18n.tr(i18n.TR.STATISTICS_IN_DAYS_RANGE, { daysStart, daysEnd });
|
||||
return i18n.tr(i18n.TR.STATISTICS_IN_DAYS_RANGE, {
|
||||
daysStart,
|
||||
daysEnd: daysEnd - 1,
|
||||
});
|
||||
} else {
|
||||
return i18n.tr(i18n.TR.STATISTICS_DAYS_AGO_RANGE, {
|
||||
daysStart: Math.abs(daysEnd),
|
||||
daysEnd: -daysStart,
|
||||
daysEnd: -daysStart - 1,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user