diff --git a/src/lib/components/Options/DailyStats.svelte b/src/lib/components/Options/DailyStats.svelte index 9c205de1..646567e6 100644 --- a/src/lib/components/Options/DailyStats.svelte +++ b/src/lib/components/Options/DailyStats.svelte @@ -119,11 +119,9 @@ {@html abbreviateNumberWithColor( - rawData?.net_premium, - false, - true, - )}{@html rawData?.net_premium + ? abbreviateNumberWithColor(rawData?.net_premium, false, true) + : "n/a"} @@ -211,78 +209,88 @@ - - -
- -
- + {#if rawData?.premium_ratio?.at(0)} + + +
+
+ class="flex w-full max-w-28 h-5 bg-gray-200 rounded-md overflow-hidden" + > + +
- -
+ +
- -
-
-
- - -
-
-
- Bearish: {@html abbreviateNumberWithColor( - rawData?.premium_ratio[0], - false, - true, - )} -
-
- Neutral: {@html abbreviateNumberWithColor( - rawData?.premium_ratio[1], - false, - true, - )} -
-
- Bullish: {@html abbreviateNumberWithColor( - rawData?.premium_ratio[2], - false, - true, - )} + +
-
-
- + + +
+
+
+ Bearish: {@html abbreviateNumberWithColor( + rawData?.premium_ratio?.at(0), + false, + true, + )} +
+
+ Neutral: {@html abbreviateNumberWithColor( + rawData?.premium_ratio?.at(1), + false, + true, + )} +
+
+ Bullish: {@html abbreviateNumberWithColor( + rawData?.premium_ratio?.at(2), + false, + true, + )} +
+
+
+
+ + {:else} + n/a + {/if} + - {@html abbreviateNumberWithColor( - rawData?.net_call_premium, - false, - true, - )} - x {@html abbreviateNumberWithColor( - rawData?.net_put_premium, - false, - true, - )} + {#if rawData?.net_call_premium || rawData?.net_put_premium} + {@html abbreviateNumberWithColor( + rawData?.net_call_premium, + false, + true, + )} + x {@html abbreviateNumberWithColor( + rawData?.net_put_premium, + false, + true, + )} + {:else} + n/a + {/if}