Skip to content

Commit

Permalink
fix(core): scale padding
Browse files Browse the repository at this point in the history
  • Loading branch information
tuner committed Feb 16, 2024
1 parent 3c71c7e commit a1e6a0e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/core/src/scale/scale.js
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,8 @@ function rawDomain(scale, raw, logger) {
}

function padDomain(type, domain, range, pad, exponent, constant) {
range ??= [0, 1]; // default to unit range. TODO: Fix this when we have pixel-based ranges.

var span = Math.abs(peek(range) - range[0]),
frac = span / (span - 2 * pad),
d =
Expand Down

0 comments on commit a1e6a0e

Please sign in to comment.