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 @@ -20,6 +20,7 @@ dc.numberDisplay = function (parent, chartGroup) {
2020 var _formatNumber = d3 . format ( '.2s' ) ;
2121 var _chart = dc . baseMixin ( { } ) ;
2222 var _html = { one : '' , some : '' , none : '' } ;
23+ var _lastValue ;
2324
2425 // dimension not required
2526 _chart . _mandatoryAttributes ( [ 'group' ] ) ;
@@ -100,9 +101,9 @@ dc.numberDisplay = function (parent, chartGroup) {
100101 . ease ( 'quad-out-in' )
101102 . tween ( 'text' , function ( ) {
102103 // [XA] don't try and interpolate from Infinity, else this breaks.
103- var interpStart = isFinite ( this . lastValue ) ? this . lastValue : 0 ;
104+ var interpStart = isFinite ( _lastValue ) ? _lastValue : 0 ;
104105 var interp = d3 . interpolateNumber ( interpStart || 0 , newValue ) ;
105- this . lastValue = newValue ;
106+ _lastValue = newValue ;
106107 return function ( t ) {
107108 var html = null , num = _chart . formatNumber ( ) ( interp ( t ) ) ;
108109 if ( newValue === 0 && ( _html . none !== '' ) ) {
You can’t perform that action at this time.
0 commit comments