Skip to content

Commit 4bcabf0

Browse files
committed
shorten
1 parent aa785ba commit 4bcabf0

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/transforms/bin.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,10 +171,7 @@ function maybeBin(options) {
171171
if (domain !== undefined) bin.domain(domain);
172172
if (thresholds !== undefined) bin.thresholds(thresholds);
173173
let bins = bin(range(data)).map(binset);
174-
if (cumulative) {
175-
if (cumulative < 0) bins.reverse();
176-
bins = bins.map(bincumset);
177-
}
174+
if (cumulative) bins = (cumulative < 0 ? bins.reverse() : bins).map(bincumset);
178175
return bins.filter(nonempty2).map(binfilter);
179176
};
180177
bin.label = labelof(value);

0 commit comments

Comments
 (0)