diff --git a/src/routes/etf/[tickerID]/options/hottest-contracts/+page.svelte b/src/routes/etf/[tickerID]/options/hottest-contracts/+page.svelte index e540c366..6fd0f5f0 100644 --- a/src/routes/etf/[tickerID]/options/hottest-contracts/+page.svelte +++ b/src/routes/etf/[tickerID]/options/hottest-contracts/+page.svelte @@ -9,10 +9,11 @@ getCache, etfTicker, screenWidth, - numberOfUnreadNotification, displayCompanyName, } from "$lib/store"; + import SEO from "$lib/components/SEO.svelte"; + import TableHeader from "$lib/components/Table/TableHeader.svelte"; import UpgradeToPro from "$lib/components/UpgradeToPro.svelte"; import Infobox from "$lib/components/Infobox.svelte"; @@ -372,12 +373,6 @@ // Initialize result with timestamp let result = timestamp + "
"; - // Variables to store bid and ask values and their colors - let bidValue = null; - let askValue = null; - let bidColor = null; - let askColor = null; - // Sort params to ensure Vol appears last params.sort((a, b) => { if (a.seriesName === "Vol") return 1; @@ -393,12 +388,13 @@ param.color + '">'; - result += - marker + - param.seriesName + - ": " + - abbreviateNumberWithColor(param.value, false, true) + - "
"; + // Check if the series is for IV and add a '%' sign + const value = + param.seriesName === "IV" + ? `${param.value}%` + : (param.value?.toLocaleString("en-US") ?? "n/a"); + + result += marker + param.seriesName + ": " + value + "
"; }); if (rawDataPoint?.dte !== undefined) { @@ -554,43 +550,10 @@ } - - - - - {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} - {$displayCompanyName} ({$etfTicker}) Hottest Options Chain Contract · - Stocknear - - - - - - - - - - - - - - - +
"; - // Variables to store bid and ask values and their colors - let bidValue = null; - let askValue = null; - let bidColor = null; - let askColor = null; - // Sort params to ensure Vol appears last params.sort((a, b) => { if (a.seriesName === "Vol") return 1; @@ -393,12 +388,13 @@ param.color + '">'; - result += - marker + - param.seriesName + - ": " + - abbreviateNumberWithColor(param.value, false, true) + - "
"; + // Check if the series is for IV and add a '%' sign + const value = + param.seriesName === "IV" + ? `${param.value}%` + : (param.value?.toLocaleString("en-US") ?? "n/a"); + + result += marker + param.seriesName + ": " + value + "
"; }); if (rawDataPoint?.dte !== undefined) { @@ -554,43 +550,10 @@ } - - - - - {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} - {$displayCompanyName} ({$stockTicker}) Hottest Options Chain Contract · - Stocknear - - - - - - - - - - - - - - - +