File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -149,7 +149,7 @@ module.exports = function setPositions(gd, plotinfo) {
149
149
150
150
sv = Math . round ( ti [ j ] . p / sumround ) ;
151
151
// 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
153
153
var previousSum = sums [ sv ] || 0 ;
154
154
if ( stack || relative ) ti [ j ] . b = previousSum ;
155
155
barEnd = ti [ j ] . b + ti [ j ] . s ;
@@ -178,7 +178,7 @@ module.exports = function setPositions(gd, plotinfo) {
178
178
for ( j = 0 ; j < ti . length ; j ++ ) {
179
179
relAndNegative = relative && ti [ j ] . s < 0 ;
180
180
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
182
182
scale = top / sums [ sv ] ;
183
183
if ( relAndNegative ) scale *= - 1 ; // preserve sign if negative
184
184
ti [ j ] . b *= scale ;
You can’t perform that action at this time.
0 commit comments