Skip to content
  • Mike Bostock's avatar
    Fix axis for scales that don’t define ticks. · b745b325
    Mike Bostock authored
    In addition to ordinal scales, quantile, quantize and threshold scales don’t
    define a ticks method. Unlike ordinal scales, however, these quantitative scales
    also don’t define a rangeBand method, so the axis was crashing trying to render
    these scales. This fixes #1367 by checking for the required rangeBand method
    rather than assuming scales without a ticks method define a rangeBand.
    
    Note, however, that even with this change you probably still want to define tick
    values explicitly when using one of these scales with an axis. That’s because
    each tick in the axis represents a span of values in the domain; you can use the
    invertExtent method to get the span for each tick value.
    b745b325