From 3d93bb69cb7948c61a7d1e63c5b4ad89eddb65c5 Mon Sep 17 00:00:00 2001 From: Amir Raminfar Date: Fri, 26 May 2023 12:07:41 -0700 Subject: [PATCH] fix: fixes cpu monitor when all values are 0. fixes #2215 (#2222) * fix: fixes cpu monitor when all values are 0. fixes #2215 * chore: remove unused imports --- assets/components/LogViewer/StatSparkline.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/components/LogViewer/StatSparkline.vue b/assets/components/LogViewer/StatSparkline.vue index e8e4fd15..3fd9e014 100644 --- a/assets/components/LogViewer/StatSparkline.vue +++ b/assets/components/LogViewer/StatSparkline.vue @@ -28,7 +28,7 @@ const shape = d3 const path = computed(() => { x.domain(d3.extent(data, (d) => d.x) as [number, number]); - y.domain(d3.extent(data, (d) => d.y) as [number, number]); + y.domain(d3.extent([...data, { y: 1 }], (d) => d.y) as [number, number]); return shape(data) ?? ""; });