From 8152eb7bf93e0eb25ced65a88b35187cdb48ffcc Mon Sep 17 00:00:00 2001 From: MuslemRahimi Date: Thu, 7 Nov 2024 18:44:56 +0100 Subject: [PATCH] add name to hoverstockhart --- src/lib/components/HoverStockChart.svelte | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/lib/components/HoverStockChart.svelte b/src/lib/components/HoverStockChart.svelte index cedc5cf4..0d02ede7 100644 --- a/src/lib/components/HoverStockChart.svelte +++ b/src/lib/components/HoverStockChart.svelte @@ -169,6 +169,8 @@ chart?.timeScale()?.fitContent(); } }); + + $: charNumber = 20;
getStockData(symbol)} class="inline-block"> @@ -190,7 +192,7 @@ class=" text-sm flex flex-row items-center justify-start bg-[#09090B]" >
-
+
-

{symbol}

+

+ {symbol} +

+
+ {stockChartData?.name?.length > charNumber + ? stockChartData?.name?.slice(0, charNumber) + "..." + : stockChartData?.name} +

Current Price: {stockChartData?.price?.toFixed(2)} (

= 0 ? '' : 'rotate-180'}" xmlns="http://www.w3.org/2000/svg"