diff --git a/src/compile/scale/range.ts b/src/compile/scale/range.ts index e114d5625e..87058fea01 100644 --- a/src/compile/scale/range.ts +++ b/src/compile/scale/range.ts @@ -63,6 +63,7 @@ import {Explicit, makeExplicit, makeImplicit} from '../split'; import {UnitModel} from '../unit'; import {ScaleComponentIndex} from './component'; import {durationExpr} from '../../timeunit'; +import {isFacetModel} from '../model'; export const RANGE_PROPERTIES: (keyof Scale)[] = ['range', 'scheme']; @@ -306,11 +307,12 @@ function defaultRange(channel: ScaleChannel, model: UnitModel): VgRange { case RADIUS: { // max radius = half od min(width,height) + return [ 0, new SignalRefWrapper(() => { - const w = model.getSignalName('width'); - const h = model.getSignalName('height'); + const w = model.getSignalName(isFacetModel(model.parent) ? 'child_width' : 'width'); + const h = model.getSignalName(isFacetModel(model.parent) ? 'child_height' : 'height'); return `min(${w},${h})/2`; }) ];