Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d279716

Browse files
keeganmccallumetpinard
authored andcommitted
fix formatting
1 parent dcc5aee commit d279716

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/traces/bar/set_positions.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ module.exports = function setPositions(gd, plotinfo) {
149149

150150
sv = Math.round(ti[j].p / sumround);
151151
// store the negative sum value for p at the same key, with sign flipped
152-
if(relative && ti[j].s < 0) sv = '-'+sv; // use string to ensure -0 !== 0
152+
if(relative && ti[j].s < 0) sv = '-' + sv; // use string to ensure -0 !== 0
153153
var previousSum = sums[sv] || 0;
154154
if(stack || relative) ti[j].b = previousSum;
155155
barEnd = ti[j].b + ti[j].s;
@@ -178,7 +178,7 @@ module.exports = function setPositions(gd, plotinfo) {
178178
for(j = 0; j < ti.length; j++) {
179179
relAndNegative = relative && ti[j].s < 0;
180180
sv = Math.round(ti[j].p / sumround);
181-
if(relAndNegative) sv = -sv; // locate negative sum amount for this p val
181+
if(relAndNegative) sv = '-' + sv; // locate negative sum amount for this p val
182182
scale = top / sums[sv];
183183
if(relAndNegative) scale *= -1; // preserve sign if negative
184184
ti[j].b *= scale;

0 commit comments

Comments
 (0)