diff --git a/src/views/dashboard/related/trace/utils/d3-trace-list.ts b/src/views/dashboard/related/trace/utils/d3-trace-list.ts index 8d90dc62..ddd70432 100644 --- a/src/views/dashboard/related/trace/utils/d3-trace-list.ts +++ b/src/views/dashboard/related/trace/utils/d3-trace-list.ts @@ -46,8 +46,8 @@ export default class ListGraph { .select(this.el) .append("svg") .attr("class", "trace-list-dowanload") - .attr("width", this.width) - .attr("height", this.height) + .attr("width", this.width > 0 ? this.width : 10) + .attr("height", this.height > 0 ? this.height : 10) .attr("transform", `translate(-5, 0)`); this.tip = (d3tip as any)() .attr("class", "d3-tip") diff --git a/src/views/dashboard/related/trace/utils/d3-trace-tree.ts b/src/views/dashboard/related/trace/utils/d3-trace-tree.ts index 02382834..fab33bf8 100644 --- a/src/views/dashboard/related/trace/utils/d3-trace-tree.ts +++ b/src/views/dashboard/related/trace/utils/d3-trace-tree.ts @@ -57,8 +57,8 @@ export default class TraceMap { .select(this.el) .append("svg") .attr("class", "d3-trace-tree") - .attr("width", this.width) - .attr("height", this.height); + .attr("width", this.width > 0 ? this.width : 10) + .attr("height", this.height > 0 ? this.height : 10); this.tip = (d3tip as any)() .attr("class", "d3-tip") .offset([-8, 0])