This commit is contained in:
MuslemRahimi 2025-01-10 09:55:02 +01:00
parent 8d834d1d3a
commit dcd972deac
5 changed files with 21 additions and 14 deletions

View File

@ -49,6 +49,15 @@
}));
const dates = processedData?.map((d) => d.expiry);
const formattedDates = dates.map((date) => {
const d = new Date(date);
return d.toLocaleDateString("en-US", {
month: "short", // Abbreviated month name
day: "numeric", // Day of the month
year: "2-digit", // Two-digit year
});
});
const callValues = processedData?.map((d) => d.callValue?.toFixed(2));
const putValues = processedData?.map((d) => d.putValue?.toFixed(2));
const barWidthPercentage = Math.max(100 / processedData.length, 20); // Adjust automatically, max 80%
@ -93,18 +102,13 @@
},
xAxis: {
type: "category",
data: dates,
data: formattedDates,
axisLine: { lineStyle: { color: "#fff" } },
axisLabel: {
color: "#fff",
interval: (index) => index % 2 === 0, // Show every 5th label
rotate: 45, // Rotate labels for better readability
fontSize: 12, // Adjust font size if needed
margin: 20,
},
splitLine: { show: false },
},
series: [
{
name: `Put`,

View File

@ -53,7 +53,7 @@
const strikes = processedData?.map((d) => d.strike);
const callValues = processedData?.map((d) => d.callValue?.toFixed(2));
const putValues = processedData?.map((d) => d.putValue?.toFixed(2));
const barWidthPercentage = Math.max(100 / processedData.length, 30); // Adjust automatically, max 80%
const barWidthPercentage = Math.max(100 / processedData.length, 30);
const options = {
animation: false,
@ -101,7 +101,7 @@
color: "#fff",
interval: (index) => index % 5 === 0, // Show every 5th label
rotate: 45, // Rotate labels for better readability
fontSize: 14, // Adjust font size if needed
fontSize: $screenWidth < 640 ? 10 : 14, // Adjust font size if needed
margin: 20,
},
splitLine: { show: false },

View File

@ -736,6 +736,7 @@
{displayedData[index]?.execution_estimate
?.replace("At", "")
?.replace("Above", "")
?.replace("Below", "")
?.replace("Midpoint", "Mid")}
</div>

View File

@ -738,15 +738,17 @@
<div
class="flex flex-row justify-between items-center w-full sm:-mt-[50px] mb-5 sm:mb-10"
>
<span
<div
class="text-2xl lg:text-3xl font-bold text-white"
>
{$displayCompanyName?.length > charNumber
? $displayCompanyName?.slice(0, charNumber) +
"..."
: $displayCompanyName}
({$stockTicker?.toUpperCase()})
</span>
<span class="hidden sm:inline-block"
>({$stockTicker?.toUpperCase()})</span
>
</div>
<div
class="sm:hidden items-end justify-end absolute right-3 top-14 {$scoreComponent ===
false
@ -804,7 +806,7 @@
{/if}
</div>
</div>
{#if Object?.keys(prePostData)?.length !== 0 && !$isOpen}
{#if Object?.keys(prePostData)?.length !== 0 && !$isOpen && prePostData?.timestamp > 0}
<div
class="border-l border-default pl-3 bp:pl-5"
>

View File

@ -969,7 +969,7 @@
? $wsBidPrice
: ((data?.getStockQuote?.bid !== 0
? data?.getStockQuote?.bid
: "-") ?? "n/a")}</td
: "n/a") ?? "n/a")}</td
></tr
>
<tr
@ -1094,7 +1094,7 @@
? $wsAskPrice
: ((data?.getStockQuote?.ask !== 0
? data?.getStockQuote?.ask
: "-") ?? "n/a")}</td
: "n/a") ?? "n/a")}</td
></tr
>
<tr