File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ import {
36
36
import GlobalModel from '../Global' ;
37
37
import { TooltipMarkupBlockFragment } from '../../component/tooltip/tooltipMarkup' ;
38
38
import { error , makePrintable } from '../../util/log' ;
39
+ import { round } from '../../util/number' ;
39
40
40
41
const DIMENSION_LABEL_REG = / \{ @ ( .+ ?) \} / g;
41
42
@@ -102,8 +103,8 @@ export class DataFormatMixin {
102
103
const stackTop = data . get ( stackResultDim , dataIndex ) as number ;
103
104
const stackBottom = data . get ( stackedOverDim , dataIndex ) as number ;
104
105
if ( ! isNaN ( stackTop ) && ! isNaN ( stackBottom ) ) {
105
- const fullPercentValue = stackTop - stackBottom ;
106
- params . percent = Math . round ( fullPercentValue * 100 ) / 100 ;
106
+ const normalizedValue = stackTop - stackBottom ;
107
+ params . percent = round ( normalizedValue , 2 ) ;
107
108
}
108
109
}
109
110
return params ;
You can’t perform that action at this time.
0 commit comments