onProgress(fraction) {
    let currentVal =
      this.initialValue + (this.targetValue - this.initialValue) * fraction;

    if (this.attrs.decimals) {
      currentVal = currentVal.toFixed(this.attrs.decimals);
    } else {
      currentVal = Math.trunc(currentVal);
    }

    this.element.innerHTML = currentVal;
  }
/**
   * Takes two arguments the "fraction" which is a number from 0 to 1, representing
   * the fraction (the percentage) of the duration that we are in,
   * and the millisecond which defines the absolute millisecond.
   * You can use this method to animate your attribute.
   * Remember that you don't need to worry about easings. Easings are already
   * applied before reaching the execution of this method. This method's
   * arguments have already been re-calculated based on the easing.
   **/
Takes two arguments the "fraction" which is a number from 0 to 1, representing
the fraction (the percentage) of the duration that we are in,
and the millisecond which defines the absolute millisecond.
You can use this method to animate your attribute.
Remember that you don't need to worry about easings. Easings are already
applied before reaching the execution of this method. This method's
arguments have already been re-calculated based on the easing.
Takes two arguments the " fraction " which is a number from 0 to 1 representing the fraction ( the percentage ) of the duration that we are in and the millisecond which defines the absolute millisecond . You can use this method to animate your attribute . Remember that you don ' t need to worry about easings . Easings are already applied before reaching the execution of this method . This method ' s arguments have already been re - calculated based on the easing .
onProgress(fraction) {
    let currentVal =
      this.initialValue + (this.targetValue - this.initialValue) * fraction;
    if (this.attrs.decimals) {
      currentVal = currentVal.toFixed(this.attrs.decimals);
    } else {
      currentVal = Math.trunc(currentVal);
    }
    this.element.innerHTML = currentVal;
  }
onProgress ( fraction ) { let currentVal = this . initialValue + ( this . targetValue - this . initialValue ) * fraction ; if ( this . attrs . decimals ) { currentVal = currentVal . toFixed ( this . attrs . decimals ) ; } else { currentVal = Math . trunc ( currentVal ) ; } this . element . innerHTML = currentVal ; }
Takes two arguments the "fraction" which is a number from 0 to 1, representing
 the fraction (the percentage) of the duration that we are in,
 and the millisecond which defines the absolute millisecond.
Takes two arguments the " fraction " which is a number from 0 to 1 representing the fraction ( the percentage ) of the duration that we are in and the millisecond which defines the absolute millisecond .