diff --git a/AquaNet/src/pages/UserHome.svelte b/AquaNet/src/pages/UserHome.svelte index 54c13c96..1088b9a8 100644 --- a/AquaNet/src/pages/UserHome.svelte +++ b/AquaNet/src/pages/UserHome.svelte @@ -75,18 +75,22 @@
- {return {x: Date.parse(it.date), y: it.rating}}), - borderColor: '#646cff', - tension: 0.1, + {#if d.trend.length === 0} +
No data in the past 60 days
+ {:else} + {return {x: Date.parse(it.date), y: it.rating}}), + borderColor: '#646cff', + tension: 0.1, - // TODO: Set X axis span to 3 months - } - ] - }} options={CHARTJS_OPT} /> + // TODO: Set X axis span to 3 months + } + ] + }} options={CHARTJS_OPT} /> + {/if}
@@ -282,6 +286,13 @@ $gap: 20px > .chartjs-box-reference position: absolute inset: 0 + display: flex + align-items: center + justify-content: center + + .no-data + opacity: 0.5 + user-select: none @media (max-width: $w-mobile) flex-direction: column