function getTickValues(scale, tickTotal, tickValues) {
  return !tickValues
    ? scale.ticks
      ? scale.ticks(tickTotal)
      : scale.domain()
    : tickValues;
}
Get the tick values from a given d3 scale.
@param {d3.scale} scale Scale function.
@param {number} tickTotal Total number of ticks
@param {Array} tickValues Array of tick values if they exist.
@returns {Array} Array of tick values.