From 4591578cb28c08f05d1f37daf0f7bc178d9264ff Mon Sep 17 00:00:00 2001 From: Matt Batchelder Date: Sat, 21 Feb 2026 02:29:38 -0500 Subject: [PATCH] Update SVG dimensions and adjust layout for dashboard charts --- theme/assets/js/dashboard-animator.js | 8 +- theme/blocks/index.php | 114 +++++++++++++------------- 2 files changed, 62 insertions(+), 60 deletions(-) diff --git a/theme/assets/js/dashboard-animator.js b/theme/assets/js/dashboard-animator.js index 4ac994a..b1e9ca1 100644 --- a/theme/assets/js/dashboard-animator.js +++ b/theme/assets/js/dashboard-animator.js @@ -10,6 +10,8 @@ var BAR_H = 120; // max bar height (SVG units) var BAR_MIN = 0.15; // min bar ratio var LINE_PTS = 8; + var LINE_W = 340; // line graph width in SVG units + var PIE_R = 55; // pie chart radius var DARK = { text: '#E0E0E0', muted: '#9E9E9E', border: '#333', center: '#222' }; var LIGHT = { text: '#333333', muted: '#666666', border: '#E0E0E0', center: '#fff' }; @@ -58,12 +60,12 @@ if (!st.linePath) return; var d = 'M'; for (var i = 0; i < LINE_PTS; i++) { - var x = (i / (LINE_PTS - 1)) * 200; + var x = (i / (LINE_PTS - 1)) * LINE_W; var y = 25 + (1 - wave(st.phase * 0.8, i * 0.9)) * 110; d += (i ? ' L' : '') + x.toFixed(1) + ',' + y.toFixed(1); } st.linePath.setAttribute('d', d); - if (st.lineFill) st.lineFill.setAttribute('d', d + ' L200,145 L0,145 Z'); + if (st.lineFill) st.lineFill.setAttribute('d', d + ' L' + LINE_W + ',145 L0,145 Z'); } /* Pie: each segment gently shifts its slice size, no spinning */ @@ -85,7 +87,7 @@ var endA = (angle + sweep) * Math.PI / 180; // Large-arc flag needed when sweep > 180 var large = sweep > 180 ? 1 : 0; - var r = 45; + var r = PIE_R; var x1 = Math.sin(startA) * r, y1 = -Math.cos(startA) * r; var x2 = Math.sin(endA) * r, y2 = -Math.cos(endA) * r; var path = st.pieSegs[j].querySelector('path'); diff --git a/theme/blocks/index.php b/theme/blocks/index.php index 48f7771..1fa1d9e 100644 --- a/theme/blocks/index.php +++ b/theme/blocks/index.php @@ -1350,7 +1350,7 @@ function oribi_render_platform_row( $a ) { $visual_html = '
- + @@ -1362,98 +1362,98 @@ function oribi_render_platform_row( $a ) { - - + + Performance - - - - - + + + + + - API - Cache - DB - Queue - Worker + API + Cache + DB + Queue + Worker - - 0% - 0% - 0% - 0% - 0% + + 0% + 0% + 0% + 0% + 0% - - + + Requests/sec - - - - + + + + - Read - Write - Update - Delete + Read + Write + Update + Delete - - 0 - 0 - 0 - 0 + + 0 + 0 + 0 + 0 - - + + Traffic Trend - - - - + + + + - - + + - - - Distribution - + + + Distribution + - + - + - + - + - - 100% + + 100% - + Service A Service B - - Service C - - Service D + + Service C + + Service D