From 30d9d9c8e7d5aa4008b9ed84fcf13329180ac8cd Mon Sep 17 00:00:00 2001 From: Eli Bosley Date: Tue, 23 Sep 2025 14:42:34 -0400 Subject: [PATCH] feat: adjust CPU chart canvas height and update value formatting for better readability --- emhttp/plugins/dynamix/DashStats.page | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/emhttp/plugins/dynamix/DashStats.page b/emhttp/plugins/dynamix/DashStats.page index 28bff6383..39ea3ff6b 100755 --- a/emhttp/plugins/dynamix/DashStats.page +++ b/emhttp/plugins/dynamix/DashStats.page @@ -412,7 +412,7 @@ switch ($themeHelper->getThemeName()) { // $themeHelper set in DefaultPageLayout ?> - + @@ -1447,7 +1447,7 @@ function getMillisPerPixel(timeInSeconds, containerId) { // SmoothieCharts initialization var cpuchart = new SmoothieChart({ millisPerPixel: (cpuline * 1000) / 600, // Safe initial value - minValue: 0, + minValue: -1, maxValue: 100, responsive: true, grid: { @@ -1466,10 +1466,10 @@ var cpuchart = new SmoothieChart({ minValueScale: 1.02, maxValueScale: 1.02, yMinFormatter: function(value) { - return Math.max(0, Math.floor(value)); + return Math.max(0, Math.floor(value)) + ' %'; }, yMaxFormatter: function(value) { - return Math.floor(value); + return Math.max(0, Math.min(100, Math.ceil(value))) + ' %'; } });