From e38f012b234a56fc2af762b2e5ab99e08a636602 Mon Sep 17 00:00:00 2001 From: hobokenchicken Date: Mon, 2 Mar 2026 13:52:28 -0500 Subject: [PATCH] fix(dashboard): constrain chart containers to prevent infinite canvas growth Added fixed height and position:relative to .chart-container so Chart.js responsive mode has a bounded parent. Removed height attributes from all canvas elements that conflict with Chart.js responsive sizing. --- static/css/dashboard.css | 6 ++++++ static/js/dashboard.js | 18 +++++++++--------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/static/css/dashboard.css b/static/css/dashboard.css index cc8d211c..b82206e3 100644 --- a/static/css/dashboard.css +++ b/static/css/dashboard.css @@ -842,10 +842,16 @@ body { /* Charts */ .chart-container { + position: relative; background: var(--bg1); border: 1px solid var(--bg2); border-radius: var(--border-radius); padding: 1.5rem; + height: 350px; +} + +.chart-container canvas { + max-height: 100%; } /* Forms */ diff --git a/static/js/dashboard.js b/static/js/dashboard.js index aef38875..fd88935c 100644 --- a/static/js/dashboard.js +++ b/static/js/dashboard.js @@ -186,11 +186,11 @@ class Dashboard {

Request Volume (Last 24h)

- +

Provider Share

- +
@@ -241,7 +241,7 @@ class Dashboard {

Usage by Client

- +
`; } @@ -333,11 +333,11 @@ class Dashboard {

Volume by Client

- +

Model Distribution

- +
@@ -364,7 +364,7 @@ class Dashboard {

Provider Spending

- +
@@ -418,15 +418,15 @@ class Dashboard {

Latency (ms)

- +

Error Rate (%)

- +

Rate Limiting

- +
`;