From eaa17ca2b3061135d60a8015bade249870b76b15 Mon Sep 17 00:00:00 2001 From: Qiuxia Fan Date: Tue, 24 May 2022 11:04:47 +0800 Subject: [PATCH] fix frame graph --- .../dashboard/related/ebpf/components/EBPFStack.vue | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/views/dashboard/related/ebpf/components/EBPFStack.vue b/src/views/dashboard/related/ebpf/components/EBPFStack.vue index a363b19f..9193f88e 100644 --- a/src/views/dashboard/related/ebpf/components/EBPFStack.vue +++ b/src/views/dashboard/related/ebpf/components/EBPFStack.vue @@ -68,12 +68,13 @@ function drawGraph() { root.value = param[0]; root.dumpCount = param[1]; stackTree.value = root; - const w = (graph.value && graph.value.getBoundingClientRect().width) || 10; + const width = (graph.value && graph.value.getBoundingClientRect().width) || 0; + const w = width < 800 ? 802 : width; flameChart.value = flamegraph() - .width(w - 15) - .cellHeight(18) + .width(w - 2) + .cellHeight(10) .transitionDuration(750) - .minFrameSize(5) + .minFrameSize(1) .transitionEase(d3.easeCubic as any) .sort(true) .title("") @@ -169,6 +170,7 @@ watch( width: 100%; height: 100%; cursor: pointer; + min-width: 1000px; } .tip {