mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
Omit zero interval, and don't nice the values
* to keep promise of radio buttons: * 1 month should mean 30/31 days
This commit is contained in:
parent
97e3bfe1c0
commit
e89996bc27
1 changed files with 2 additions and 3 deletions
|
@ -84,13 +84,12 @@ export function prepareIntervalData(
|
|||
case IntervalRange.All:
|
||||
break;
|
||||
}
|
||||
const xMin = 0;
|
||||
const xMin = 1;
|
||||
xMax = xMax! + 1;
|
||||
|
||||
// cap bars to available range
|
||||
const desiredBars = Math.min(70, xMax! - xMin!);
|
||||
|
||||
const scale = scaleLinear().domain([xMin!, xMax!]).nice();
|
||||
const scale = scaleLinear().domain([xMin!, xMax!]);
|
||||
const bins = histogram()
|
||||
.domain(scale.domain() as any)
|
||||
.thresholds(scale.ticks(desiredBars))(allIntervals);
|
||||
|
|
Loading…
Reference in a new issue