Skip to content

Commit c387f9b

Browse files
committed
histogram: improve code readability of calc
1 parent ec448f2 commit c387f9b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/traces/histogram/calc.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ function calc(gd, trace) {
102102
};
103103
}
104104

105+
// stash left and right gaps by group
105106
if(!gd._fullLayout._roundFnOpts) gd._fullLayout._roundFnOpts = {};
106107
var groupName = trace['_' + mainData + 'bingroup'];
107108
var roundFnOpts = {leftGap: Infinity, rightGap: Infinity};
@@ -140,7 +141,11 @@ function calc(gd, trace) {
140141
roundFn = function(v, isRightEdge) {
141142
return function() {
142143
var roundFnOpts = gd._fullLayout._roundFnOpts[groupName];
143-
return getBinSpanLabelRound(roundFnOpts.leftGap, roundFnOpts.rightGap, binEdges, pa, calendar)(v, isRightEdge);
144+
return getBinSpanLabelRound(
145+
roundFnOpts.leftGap,
146+
roundFnOpts.rightGap,
147+
binEdges, pa, calendar
148+
)(v, isRightEdge);
144149
};
145150
};
146151
}

0 commit comments

Comments
 (0)