This commit is contained in:
Qiuxia Fan 2022-04-26 14:08:42 +08:00
parent e99416bec7
commit 5b95331ac9

View File

@ -40,10 +40,8 @@ export default class ListGraph {
constructor(el: HTMLDivElement, handleSelectSpan: (i: Trace) => void) { constructor(el: HTMLDivElement, handleSelectSpan: (i: Trace) => void) {
this.handleSelectSpan = handleSelectSpan; this.handleSelectSpan = handleSelectSpan;
this.el = el; this.el = el;
console.log(el.getBoundingClientRect());
this.width = el.getBoundingClientRect().width - 10; this.width = el.getBoundingClientRect().width - 10;
this.height = el.getBoundingClientRect().height - 10; this.height = el.getBoundingClientRect().height - 10;
console.log(el);
this.svg = d3 this.svg = d3
.select(this.el) .select(this.el)
.append("svg") .append("svg")