From 9c7f07a56aabccdafb3bddebbe00d74867586545 Mon Sep 17 00:00:00 2001 From: MuslemRahimi Date: Thu, 6 Mar 2025 12:32:56 +0100 Subject: [PATCH] ui fix --- src/lib/components/ShareHolders.svelte | 81 ++++++++++++-------------- 1 file changed, 37 insertions(+), 44 deletions(-) diff --git a/src/lib/components/ShareHolders.svelte b/src/lib/components/ShareHolders.svelte index f3719cd8..eb954f59 100644 --- a/src/lib/components/ShareHolders.svelte +++ b/src/lib/components/ShareHolders.svelte @@ -28,8 +28,6 @@ let topHolders = 0; function plotData() { - shareholderList = shareholderList?.filter((item) => item?.ownership <= 100); - let institutionalOwner = rawData?.ownershipPercent > 100 ? 99.99 : rawData?.ownershipPercent || 0; let otherOwner = institutionalOwner === 0 ? 0 : 100 - institutionalOwner; @@ -235,59 +233,54 @@ // Sort using the generic comparison function displayList = [...originalData].sort(compareValues)?.slice(0, 50); }; - - function generateStatementInfoHTML() { - if (shareholderList?.length > 0) { - return ` - - 13F institutions, like mutual and pension funds, are large investors - required by the SEC to disclose their holdings quarterly, significantly - impacting company decisions and stock trends. - - `; - } else { - return ` - - There are currently no records available for the 13 institutional - holders of ${$displayCompanyName} - - `; - } - } - - let htmlOutput = generateStatementInfoHTML();
{#if shareholderList?.length !== 0} -
-
- As of {new Date(rawData?.date)?.toLocaleString("en-US", { - month: "short", - day: "numeric", - year: "numeric", - daySuffix: "2-digit", - })}, +
+

+ Total Institutes of {rawData?.investorsHolding?.toLocaleString( + "en-US", + )} in {removeCompanyStrings($displayCompanyName)} + {rawData?.investorsHoldingChange >= 0 + ? "expanded their positions with an increase of" + : "reduced their positions with a decrease of"} {new Intl.NumberFormat("en", { - minimumFractionDigits: 0, - maximumFractionDigits: 0, - }).format(rawData?.investorsHolding)}{Math.abs(rawData?.investorsHoldingChange)} - Institutions hold a total of - {@html abbreviateNumber( - rawData?.numberOf13Fshares, + investors compared to the previous quarter. + {rawData?.numberOf13FsharesChange >= 0 + ? "An additional" + : "A reduction of"} + + {@html abbreviateNumber( + Math.abs(rawData?.numberOf13FsharesChange), false, true, - )} - {$displayCompanyName} shares, with a combined investment of + )} + + shares, as total invested capital {rawData?.totalInvestedChange >= 0 + ? "grew by" + : "declined by"} + + {@html abbreviateNumber( + Math.abs(rawData?.totalInvestedChange), + true, + true, + )} + + {rawData?.ownershipPercent >= rawData?.lastOwnershipPercent + ? "with ownership percentage increasing from" + : "with ownership percentage dropping from"} {@html abbreviateNumber(rawData?.totalInvested, true, true)}{rawData?.lastOwnershipPercent?.toFixed(2)}% + to + {rawData?.ownershipPercent?.toFixed(2)}%. -

+