range(data) {
    this.customExtent = [d3.min(data, this.getMinFn()), d3.max(data, this.getMaxFn())]
    if(this.customExtent[0] > 0)
      this.customExtent[0] = 0

    if(this.customExtent[1] < 0)
      this.customExtent[1] = 0

    let difference = (this.customExtent[1] - this.customExtent[0]) * 0.05;

    if(this.customExtent[0] < 0)
      this.customExtent[0] = this.customExtent[0] - Math.abs(difference);

    if(this.customExtent[1] > 0)
      this.customExtent[1] = this.customExtent[1] + Math.abs(difference);

    return this.customExtent
}
// calculate range and make starting point from zero
calculate range and make starting point from zero
calculate range and make starting point from zero
range(data) {
    this.customExtent = [d3.min(data, this.getMinFn()), d3.max(data, this.getMaxFn())]
    if(this.customExtent[0] > 0)
      this.customExtent[0] = 0
    if(this.customExtent[1] < 0)
      this.customExtent[1] = 0
    let difference = (this.customExtent[1] - this.customExtent[0]) * 0.05;
    if(this.customExtent[0] < 0)
      this.customExtent[0] = this.customExtent[0] - Math.abs(difference);
    if(this.customExtent[1] > 0)
      this.customExtent[1] = this.customExtent[1] + Math.abs(difference);
    return this.customExtent
}
range ( data ) { this . customExtent = [ d3 . min ( data , this . getMinFn ( ) ) , d3 . max ( data , this . getMaxFn ( ) ) ] if ( this . customExtent [ 0 ] > 0 ) this . customExtent [ 0 ] = 0 if ( this . customExtent [ 1 ] < 0 ) this . customExtent [ 1 ] = 0 let difference = ( this . customExtent [ 1 ] - this . customExtent [ 0 ] ) * 0.05 ; if ( this . customExtent [ 0 ] < 0 ) this . customExtent [ 0 ] = this . customExtent [ 0 ] - Math . abs ( difference ) ; if ( this . customExtent [ 1 ] > 0 ) this . customExtent [ 1 ] = this . customExtent [ 1 ] + Math . abs ( difference ) ; return this . customExtent }
calculate range and make starting point from zero
calculate range and make starting point from zero