From 7d86c5443121fbd401502bda7761a2c01359db50 Mon Sep 17 00:00:00 2001 From: MuslemRahimi Date: Tue, 31 Dec 2024 11:26:35 +0100 Subject: [PATCH] ui fix --- .../stocks/[tickerID]/options/+page.svelte | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/routes/stocks/[tickerID]/options/+page.svelte b/src/routes/stocks/[tickerID]/options/+page.svelte index bec5d45a..85f98fe1 100644 --- a/src/routes/stocks/[tickerID]/options/+page.svelte +++ b/src/routes/stocks/[tickerID]/options/+page.svelte @@ -17,6 +17,7 @@ import { BarChart, LineChart } from "echarts/charts"; import { GridComponent, TooltipComponent } from "echarts/components"; import { CanvasRenderer } from "echarts/renderers"; + import Infobox from "$lib/components/Infobox.svelte"; use([BarChart, LineChart, GridComponent, TooltipComponent, CanvasRenderer]); export let data; @@ -521,7 +522,7 @@ $: { if ( (displayTimePeriod || displayData) && - optionsPlotData?.length !== 0 && + rawPlotData?.length !== 0 && typeof window !== "undefined" ) { // Filter the raw plot data based on the selected time period @@ -576,11 +577,17 @@ class="w-full relative flex justify-center items-center overflow-hidden" >
-
- -
+ {#if Object?.keys(dailyStats)?.length === 0 && rawPlotData?.length === 0} + + {/if} - {#if optionsPlotData?.length !== 0} + {#if Object?.keys(dailyStats)?.length > 0} +
+ +
+ {/if} + + {#if rawPlotData?.length > 0}