# All files / utils getScale.ts

71.43% Statements 5/7
33.33% Branches 1/3
100% Functions 1/1
71.43% Lines 5/7

Press n or j to go to the next uncovered block, b, p or k for the previous block.

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    161x
    1x

    1x
    63x

    63x

     import {getLogScale} from './getLogScale'
    import {getLinearScale} from './getLinearScale'

    import {ScaleFactory} from '../types'

    export const getScale = (scale: string): ScaleFactory => {
      switch (scale) {
        case 'linear':
          return getLinearScale
        case 'log':
          return getLogScale
        default:
          return getLinearScale
      }
    }