Function nice

  • Returns a new interval [niceStart, niceStop] covering the given interval [start, stop] and where niceStart and niceStop are guaranteed to align with the corresponding tick step. Like d3.tickIncrement, this requires that start is less than or equal to stop.

    Parameters

    • start: number

      Start value for ticks

    • stop: number

      Stop value for ticks

    • count: number

      count + 1 is the approximate number of ticks to be returned by d3.ticks.

    Returns [number, number]