bugfixing

This commit is contained in:
MuslemRahimi 2024-10-01 11:46:34 +02:00
parent ea915e4f4b
commit 7311ae7dac
2 changed files with 8 additions and 13 deletions

View File

@ -50,8 +50,6 @@
break; break;
} }
} }
} else if (displayData === "6M") {
currentDataRow = sixMonthPrice?.slice(-1)?.at(0);
} }
//currentDataRow = oneWeekPrice.slice(-1)[0] //currentDataRow = oneWeekPrice.slice(-1)[0]
@ -701,11 +699,11 @@ afterUpdate(async () => {
<div class="text-2xl md:text-3xl font-bold text-white flex flex-row items-center w-full"> <div class="text-2xl md:text-3xl font-bold text-white flex flex-row items-center w-full">
{#if $isCrosshairMoveActive } {#if $isCrosshairMoveActive }
${displayLegend?.close} {displayLegend?.close}
{:else if !$isCrosshairMoveActive && $realtimePrice !== null} {:else if !$isCrosshairMoveActive && $realtimePrice !== null}
${$realtimePrice} {$realtimePrice}
{:else} {:else}
${displayLegend?.close} {displayLegend?.close}
{/if} {/if}

View File

@ -392,9 +392,6 @@ async function initializePrice() {
} }
} }
} }
else if (displayData === '6M') {
lastValue = sixMonthPrice?.slice(-1)?.at(0)?.close
}
displayLastLogicalRangeValue = oneDayPrice?.length === 0 && sixMonthPrice?.length !== 0 ? sixMonthPrice?.at(0)?.close : oneDayPrice?.at(0)?.close //previousClose; displayLastLogicalRangeValue = oneDayPrice?.length === 0 && sixMonthPrice?.length !== 0 ? sixMonthPrice?.at(0)?.close : oneDayPrice?.at(0)?.close //previousClose;
@ -674,7 +671,7 @@ async function initializePrice() {
geographicList = data?.getCountryWeighting; geographicList = data?.getCountryWeighting;
sectorList = data?.getETFProfile[0]?.sectorsList; sectorList = data?.getETFProfile?.at(0)?.sectorsList;
sectorList = sectorList?.sort(function(a,b) { sectorList = sectorList?.sort(function(a,b) {
return b?.exposure - a?.exposure; return b?.exposure - a?.exposure;
}) })
@ -816,11 +813,11 @@ async function exportData() {
<div class="text-2xl md:text-3xl font-bold text-white flex flex-row items-center w-full"> <div class="text-2xl md:text-3xl font-bold text-white flex flex-row items-center w-full">
{#if $isCrosshairMoveActive } {#if $isCrosshairMoveActive }
{$etfTicker?.includes('.DE') || $etfTicker?.includes('.F') ? `${displayLegend?.close}` : ` $${displayLegend?.close}`} {displayLegend?.close}
{:else if !$isCrosshairMoveActive && $realtimePrice !== null} {:else if !$isCrosshairMoveActive && $realtimePrice !== null}
{$etfTicker?.includes('.DE') || $etfTicker?.includes('.F') ? `${$realtimePrice}` : ` $${$realtimePrice}`} {$realtimePrice}
{:else} {:else}
{$etfTicker?.includes('.DE') || $etfTicker?.includes('.F') ? `${displayLegend?.close}` : ` $${displayLegend?.close}`} {displayLegend?.close}
{/if} {/if}
@ -857,7 +854,7 @@ async function exportData() {
<div class="ml-auto flex flex-col justify-end items-end "> <div class="ml-auto flex flex-col justify-end items-end ">
<div class="flex flex-row items-center justify-end"> <div class="flex flex-row items-center justify-end">
<span class="text-white text-2xl font-bold"> <span class="text-white text-2xl font-bold">
${prePostData?.price} {prePostData?.price}
</span> </span>
{#if prePostData?.changesPercentage >= 0} {#if prePostData?.changesPercentage >= 0}
<span class="ml-1 items-center justify-start text-[#37C97D] font-medium text-xs sm:text-sm">({prePostData?.changesPercentage}%)</span> <span class="ml-1 items-center justify-start text-[#37C97D] font-medium text-xs sm:text-sm">({prePostData?.changesPercentage}%)</span>