Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/layouts/dodge.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ export function dodgeY(dodgeOptions = {}, options = {}) {
}

function dodge(y, x, anchor, padding, options) {
const [, r] = maybeNumberChannel(options.r, 3);
return layout(options, (I, scales, {[x]: X, r: R}, dimensions) => {
const [, r0] = maybeNumberChannel(options.r, 3);
return layout(options, function(I, scales, {[x]: X, r: R}, dimensions) {
const r = this.r == null ? r0 : this.r;
if (X == null) throw new Error(`missing channel: ${x}`);
let [ky, ty] = anchor(dimensions);
const compare = ky ? compareAscending : compareSymmetric;
Expand Down
Loading