function tickFormat(locale, scale, count, specifier, formatType, noSkip) {
    const type = scale.type;
    let format = defaultFormatter;
    if (type === Time || formatType === Time) {
      format = locale.timeFormat(specifier);
    } else if (type === UTC || formatType === UTC) {
      format = locale.utcFormat(specifier);
    } else if (isLogarithmic(type)) {
      const varfmt = locale.formatFloat(specifier);
      if (noSkip || scale.bins) {
        format = varfmt;
      } else {
        const test = tickLog(scale, count, false);
        format = _ => test(_) ? varfmt(_) : '';
      }
    } else if (scale.tickFormat) {
      // if d3 scale has tickFormat, it must be continuous
      const d = scale.domain();
      format = locale.formatSpan(d[0], d[d.length - 1], count, specifier);
    } else if (specifier) {
      format = locale.format(specifier);
    }
    return format;
  }
Generate a label format function for a scale. If the scale has a
'tickFormat' method, it will be used to generate the formatter, with the
count and specifier arguments passed as parameters. If the scale lacks a
'tickFormat' method, the returned formatter performs simple string coercion.
If the input scale is a logarithmic scale and the format specifier does not
indicate a desired decimal precision, a special variable precision formatter
that automatically trims trailing zeroes will be generated.
@param {Scale} scale - The scale for which to generate the label formatter.
@param {*} [count] - The approximate number of desired ticks.
@param {string} [specifier] - The format specifier. Must be a legal d3
  specifier string (see https://github.com/d3/d3-format#formatSpecifier) or
  time multi-format specifier object.
@return {function(*):string} - The generated label formatter.