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) {
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 ;
You can’t perform that action at this time.
0 commit comments