diff --git a/viz/app/stats_page.js b/viz/app/stats_page.js index d75ce33..9a0bcac 100644 --- a/viz/app/stats_page.js +++ b/viz/app/stats_page.js @@ -508,7 +508,7 @@ export async function renderStats($app) { const pref = loadPrefs(); $app.innerHTML = ` -
+
@@ -567,8 +567,8 @@ export async function renderStats($app) {
-
-
+
+
@@ -855,6 +855,7 @@ export async function renderStats($app) { const yBounds = computeYBounds(series.seriesByStore, group === "all" ? 8 : 6, 1); await drawOrUpdateChart(series, yBounds); + _chart?.resize(); const short = `Loaded ${series.labels.length} day(s). Filtered SKUs: ${series.newestUsed}/${series.newestTotal}.`; onStatus(short); @@ -890,6 +891,7 @@ export async function renderStats($app) { const yBounds = computeYBounds(series.seriesByStore, group === "all" ? 8 : 6, 1); await drawOrUpdateChart(series, yBounds); + _chart?.resize(); const short = `Loaded ${series.labels.length} day(s). Filtered SKUs: ${series.newestUsed}/${series.newestTotal}.`; onStatus(short); diff --git a/viz/style.css b/viz/style.css index c8864e6..af6b48b 100644 --- a/viz/style.css +++ b/viz/style.css @@ -549,3 +549,27 @@ html { overflow-y: scroll; } .rangeDual input[type="range"]::-moz-range-track { background: transparent; } .rangeDual input[type="range"]::-moz-range-progress { background: transparent; } .rangeDual input[type="range"]::-moz-range-thumb { pointer-events: all; } + + +/* Stats page: make chart fill remaining viewport height */ +.containerFull{ + min-height: 100vh; + display: flex; + flex-direction: column; +} + +.cardFill{ + flex: 1 1 auto; + min-height: 320px; /* safety */ + display: flex; +} + +.chartFill{ + flex: 1 1 auto; + min-height: 0; /* IMPORTANT so flex children can actually shrink/grow */ +} + +.chartFill canvas{ + width: 100% !important; + height: 100% !important; +}