Spaces:
Sleeping
Sleeping
Aadithya commited on
Commit ·
bf7aeb0
1
Parent(s): 93a3733
fix: chart visibility in print mode
Browse files- frontend/src/Dashboard.jsx +2 -2
- frontend/src/styles.css +3 -0
frontend/src/Dashboard.jsx
CHANGED
|
@@ -150,7 +150,7 @@ function FullChart({ result, zoom, showHistory, showSarima = true, showChronos =
|
|
| 150 |
const forecastDates = result.forecast_dates || [];
|
| 151 |
|
| 152 |
if (!showHistory || histData.length === 0) {
|
| 153 |
-
const series = [{ name: 'Actual Demand', data: forecastActual, color: '
|
| 154 |
if (showSarima) series.push({ name: 'SARIMA Baseline', data: forecastSarima, color: '#f59e0b', w: 1.5 });
|
| 155 |
if (showChronos) series.push({ name: 'Chronos (p50)', data: forecastChronos, color: '#38bdf8', w: 2 });
|
| 156 |
|
|
@@ -237,7 +237,7 @@ function FullChart({ result, zoom, showHistory, showSarima = true, showChronos =
|
|
| 237 |
].join(' ');
|
| 238 |
|
| 239 |
const seriesLegend = [
|
| 240 |
-
{ name: 'Actual Demand', color: '
|
| 241 |
];
|
| 242 |
if (showSarima) seriesLegend.push({ name: 'SARIMA Baseline', color: '#f59e0b' });
|
| 243 |
if (showChronos) seriesLegend.push({ name: 'Chronos (p50)', color: '#38bdf8' });
|
|
|
|
| 150 |
const forecastDates = result.forecast_dates || [];
|
| 151 |
|
| 152 |
if (!showHistory || histData.length === 0) {
|
| 153 |
+
const series = [{ name: 'Actual Demand', data: forecastActual, color: 'var(--chart-actual)', w: 1.5 }];
|
| 154 |
if (showSarima) series.push({ name: 'SARIMA Baseline', data: forecastSarima, color: '#f59e0b', w: 1.5 });
|
| 155 |
if (showChronos) series.push({ name: 'Chronos (p50)', data: forecastChronos, color: '#38bdf8', w: 2 });
|
| 156 |
|
|
|
|
| 237 |
].join(' ');
|
| 238 |
|
| 239 |
const seriesLegend = [
|
| 240 |
+
{ name: 'Actual Demand', color: 'var(--chart-actual)' }
|
| 241 |
];
|
| 242 |
if (showSarima) seriesLegend.push({ name: 'SARIMA Baseline', color: '#f59e0b' });
|
| 243 |
if (showChronos) seriesLegend.push({ name: 'Chronos (p50)', color: '#38bdf8' });
|
frontend/src/styles.css
CHANGED
|
@@ -996,6 +996,9 @@ a { color: var(--accent-cyan); text-decoration: none; }
|
|
| 996 |
.hidden-print-show { display: none; }
|
| 997 |
|
| 998 |
@media print {
|
|
|
|
|
|
|
|
|
|
| 999 |
.no-print {
|
| 1000 |
display: none !important;
|
| 1001 |
}
|
|
|
|
| 996 |
.hidden-print-show { display: none; }
|
| 997 |
|
| 998 |
@media print {
|
| 999 |
+
:root {
|
| 1000 |
+
--chart-actual: #0f172a !important;
|
| 1001 |
+
}
|
| 1002 |
.no-print {
|
| 1003 |
display: none !important;
|
| 1004 |
}
|