Skip to content

Commit bd4e444

Browse files
wangyuhutiger5wang
authored andcommitted
feat: legend position custom offset
1 parent 04f0c21 commit bd4e444

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/ui/legend/category.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ export class Category extends Component<CategoryStyleProps> {
7171
}
7272

7373
private get availableSpace(): DOMRect {
74-
const { showTitle, width, height } = this.attributes;
75-
if (!showTitle) return new BBox(0, 0, width!, height!);
74+
const { showTitle, width, height, dx = 0, dy = 0 } = this.attributes;
75+
if (!showTitle) return new BBox(dx, dy, width!, height!);
7676
return (this.title.node() as Title).getAvailableSpace();
7777
}
7878

0 commit comments

Comments
 (0)