diff --git a/src/ui/legend/category.ts b/src/ui/legend/category.ts index ad61c5a0..b5b96a08 100644 --- a/src/ui/legend/category.ts +++ b/src/ui/legend/category.ts @@ -71,8 +71,8 @@ export class Category extends Component { } private get availableSpace(): DOMRect { - const { showTitle, width, height } = this.attributes; - if (!showTitle) return new BBox(0, 0, width!, height!); + const { showTitle, width, height, dx = 0, dy = 0 } = this.attributes; + if (!showTitle) return new BBox(dx, dy, width!, height!); return (this.title.node() as Title).getAvailableSpace(); }