Skip to content

Commit f4c4482

Browse files
fix eslint errors
1 parent 61efab5 commit f4c4482

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/traces/bar/set_positions.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ module.exports = function setPositions(gd, plotinfo) {
144144
for(j = 0; j < ti.length; j++) {
145145
sv = Math.round(ti[j].p / sumround);
146146
// store the negative sum value for p at the same key, with sign flipped
147-
if (relative && ti[j].s < 0) sv = -sv;
147+
if(relative && ti[j].s < 0) sv = -sv;
148148
var previousSum = sums[sv] || 0;
149149
if(stack || relative) ti[j].b = previousSum;
150150
barEnd = ti[j].b + ti[j].s;
@@ -164,7 +164,7 @@ module.exports = function setPositions(gd, plotinfo) {
164164
if(norm) {
165165
padded = false;
166166
var top = norm==='fraction' ? 1 : 100,
167-
isNegative = false,
167+
relAndNegative = false,
168168
tiny = top/1e9; // in case of rounding error in sum
169169
sMin = 0;
170170
sMax = stack ? top : 0;
@@ -173,9 +173,9 @@ module.exports = function setPositions(gd, plotinfo) {
173173
for(j = 0; j < ti.length; j++) {
174174
relAndNegative = relative && ti[j].s < 0;
175175
sv = Math.round(ti[j].p / sumround);
176-
if (relAndNegative) sv = -sv; // locate negative sum amount for this p val
176+
if(relAndNegative) sv = -sv; // locate negative sum amount for this p val
177177
scale = top / sums[sv];
178-
if (relAndNegative) scale *= -1; // preserve sign if negative
178+
if(relAndNegative) scale *= -1; // preserve sign if negative
179179
ti[j].b *= scale;
180180
ti[j].s *= scale;
181181
barEnd = ti[j].b + ti[j].s;

0 commit comments

Comments
 (0)