bugfixing

This commit is contained in:
MuslemRahimi 2025-04-07 16:24:56 +02:00
parent 86d1982c2c
commit dc43d7fb13
3 changed files with 66 additions and 78 deletions

View File

@ -753,11 +753,11 @@
<div use:highcharts={config}></div> <div use:highcharts={config}></div>
{:else} {:else}
<div <div
class="flex justify-center w-full sm:w-[650px] h-[360px] items-center" class="flex justify-center w-full sm:w-[650px] h-[300px] sm:h-[330px] items-center"
> >
<div class="relative"> <div class="relative">
<label <label
class="bg-secondary rounded-md h-14 w-14 flex justify-center items-center absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2" class="shadow-sm bg-gray-300 dark:bg-secondary rounded h-14 w-14 flex justify-center items-center absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2"
> >
<span <span
class="loading loading-spinner loading-md text-muted dark:text-gray-400" class="loading loading-spinner loading-md text-muted dark:text-gray-400"

View File

@ -191,11 +191,11 @@
// Loop through each point in the shared tooltip // Loop through each point in the shared tooltip
this.points?.forEach((point) => { this.points?.forEach((point) => {
tooltipContent += `<span class=" text-[1rem] font-[501]">${point.series.name}: ${point.y}</span><br>`; tooltipContent += `<span class="text-white text-[1rem] font-[501]">${point.series.name}: ${point.y}</span><br>`;
}); });
// Append the formatted date at the end // Append the formatted date at the end
tooltipContent += `<span class=" m-auto text-black text-sm font-normal">${formattedDate}</span><br>`; tooltipContent += `<span class="text-white m-auto text-black text-sm font-normal">${formattedDate}</span><br>`;
return tooltipContent; return tooltipContent;
}, },
@ -703,22 +703,9 @@
<!--End Ticker Section--> <!--End Ticker Section-->
<!-- Start Graph --> <!-- Start Graph -->
<div class="sm:pl-7 mt-4 mb-5 lg:flex lg:flex-row lg:gap-x-4 w-full">
{#if dataMapping[displayData]?.length === 0}
<div <div
class="order-1 lg:order-5 m-auto grow overflow-hidden border-gray-300 dark:border-gray-800 py-0.5 xs:py-1 sm:px-0.5 sm:pb-3 sm:pt-2.5 lg:mb-0 lg:border-0 lg:border-l lg:border-sharp lg:px-0 lg:py-0 lg:pl-5 md:mb-4 md:border-b" class="sm:pl-7 mt-4 mb-5 lg:flex lg:flex-row lg:gap-x-4 w-full min-h-[360px]"
> >
<div class="h-[250px] sm:h-[350px]">
<div
class="flex h-full w-full flex-col items-center justify-center rounded-sm border border-gray-300 dark:border-gray-800 p-6 text-center md:p-12"
>
<div class="mb-4 text-[1rem] sm:text-xl font-semibold">
No {displayData} chart data available
</div>
</div>
</div>
</div>
{:else}
<div <div
class="order-1 lg:order-5 grow overflow-hidden border-gray-300 dark:border-gray-800 py-0.5 xs:py-1 sm:px-0.5 sm:pb-3 sm:pt-2.5 lg:mb-0 lg:border-0 lg:border-l lg:border-sharp lg:px-0 lg:py-0 lg:pl-5 md:mb-4 md:border-b" class="order-1 lg:order-5 grow overflow-hidden border-gray-300 dark:border-gray-800 py-0.5 xs:py-1 sm:px-0.5 sm:pb-3 sm:pt-2.5 lg:mb-0 lg:border-0 lg:border-l lg:border-sharp lg:px-0 lg:py-0 lg:pl-5 md:mb-4 md:border-b"
> >
@ -751,13 +738,15 @@
> >
<span <span
class={displayLegend?.graphChange >= 0 class={displayLegend?.graphChange >= 0
? "before:content-['+'] text-green-800 dark:text-[#00FC50]" ? "before:content-['+'] text-green-600 dark:text-[#00FC50]"
: "text-red-800 dark:text-[#FF2F1F]"} : "text-red-600 dark:text-[#FF2F1F]"}
> >
{displayLegend?.graphChange ?? {displayLegend?.graphChange ??
data?.getStockQuote?.changesPercentage?.toFixed(2)}% data?.getStockQuote?.changesPercentage?.toFixed(2)}%
</span> </span>
<span class="hidden sm:block">({displayData})</span> <span class="hidden text-muted dark:text-gray-200 sm:block"
>({displayData})</span
>
</div> </div>
</div> </div>
@ -765,7 +754,7 @@
<div use:highcharts={config}></div> <div use:highcharts={config}></div>
{:else} {:else}
<div <div
class="flex justify-center w-full sm:w-[650px] h-[350px] items-center" class="flex justify-center w-full sm:w-[650px] h-[300px] sm:h-[330px] items-center"
> >
<div class="relative"> <div class="relative">
<label <label
@ -779,7 +768,6 @@
</div> </div>
{/if} {/if}
</div> </div>
{/if}
<div <div
class="mt-10 lg:mt-0 order-5 lg:order-1 flex flex-row space-x-2 sm:space-x-3 xs:space-x-4" class="mt-10 lg:mt-0 order-5 lg:order-1 flex flex-row space-x-2 sm:space-x-3 xs:space-x-4"

View File

@ -759,11 +759,11 @@
<div use:highcharts={config}></div> <div use:highcharts={config}></div>
{:else} {:else}
<div <div
class="flex justify-center w-full sm:w-[650px] h-[300px] sm:h-[360px] items-center" class="flex justify-center w-full sm:w-[650px] h-[300px] sm:h-[330px] items-center"
> >
<div class="relative"> <div class="relative">
<label <label
class="bg-secondary rounded-md h-14 w-14 flex justify-center items-center absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2" class="shadow-sm bg-gray-300 dark:bg-secondary rounded h-14 w-14 flex justify-center items-center absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2"
> >
<span <span
class="loading loading-spinner loading-md text-muted dark:text-gray-400" class="loading loading-spinner loading-md text-muted dark:text-gray-400"