We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aa785ba commit 4bcabf0Copy full SHA for 4bcabf0
src/transforms/bin.js
@@ -171,10 +171,7 @@ function maybeBin(options) {
171
if (domain !== undefined) bin.domain(domain);
172
if (thresholds !== undefined) bin.thresholds(thresholds);
173
let bins = bin(range(data)).map(binset);
174
- if (cumulative) {
175
- if (cumulative < 0) bins.reverse();
176
- bins = bins.map(bincumset);
177
- }
+ if (cumulative) bins = (cumulative < 0 ? bins.reverse() : bins).map(bincumset);
178
return bins.filter(nonempty2).map(binfilter);
179
};
180
bin.label = labelof(value);
0 commit comments