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
@ -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 New Issue
Block a user