mirror of
https://github.com/MewoLab/AquaDX.git
synced 2026-02-14 17:07:28 +08:00
[+] Display no data
This commit is contained in:
@@ -75,6 +75,9 @@
|
|||||||
<div class="trend">
|
<div class="trend">
|
||||||
<!-- ChartJS cannot be fully responsive unless there is a parent div that's independent from its size and helps it determine its size -->
|
<!-- ChartJS cannot be fully responsive unless there is a parent div that's independent from its size and helps it determine its size -->
|
||||||
<div class="chartjs-box-reference">
|
<div class="chartjs-box-reference">
|
||||||
|
{#if d.trend.length === 0}
|
||||||
|
<div class="no-data">No data in the past 60 days</div>
|
||||||
|
{:else}
|
||||||
<Line data={{
|
<Line data={{
|
||||||
datasets: [
|
datasets: [
|
||||||
{
|
{
|
||||||
@@ -87,6 +90,7 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
}} options={CHARTJS_OPT} />
|
}} options={CHARTJS_OPT} />
|
||||||
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -282,6 +286,13 @@ $gap: 20px
|
|||||||
> .chartjs-box-reference
|
> .chartjs-box-reference
|
||||||
position: absolute
|
position: absolute
|
||||||
inset: 0
|
inset: 0
|
||||||
|
display: flex
|
||||||
|
align-items: center
|
||||||
|
justify-content: center
|
||||||
|
|
||||||
|
.no-data
|
||||||
|
opacity: 0.5
|
||||||
|
user-select: none
|
||||||
|
|
||||||
@media (max-width: $w-mobile)
|
@media (max-width: $w-mobile)
|
||||||
flex-direction: column
|
flex-direction: column
|
||||||
|
|||||||
Reference in New Issue
Block a user