diff --git a/src/lib/components/DarkPool/RealtimeTrade.svelte b/src/lib/components/DarkPool/RealtimeTrade.svelte
index 6d1c5ae8..c38c3da6 100644
--- a/src/lib/components/DarkPool/RealtimeTrade.svelte
+++ b/src/lib/components/DarkPool/RealtimeTrade.svelte
@@ -97,25 +97,37 @@
},
xAxis: {
type: "datetime",
- min: startTime,
- max: endTime,
- tickLength: 0,
+ min: startTime, // Force start at 9:30
+ max: endTime, // Force end at 16:10
crosshair: {
- color: $mode === "light" ? "#545454" : "white",
- width: 1,
+ color: $mode === "light" ? "black" : "white", // Set the color of the crosshair line
+ width: 1, // Adjust the line width as needed
dashStyle: "Solid",
},
labels: {
style: { color: $mode === "light" ? "#545454" : "white" },
- distance: 20,
+ distance: 10, // Increases space between label and axis
formatter: function () {
const date = new Date(this?.value);
- return date?.toLocaleTimeString("en-US", {
- hour: "2-digit",
- minute: "2-digit",
+ const timeString = date?.toLocaleTimeString("en-US", {
+ hour: "numeric",
+ hour12: true,
});
+ return `${timeString.replace(/\s/g, " ")}`;
},
},
+ tickPositioner: function () {
+ // Create custom tick positions with wider spacing
+ const positions = [];
+ const info = this.getExtremes();
+ const tickCount = 5; // Reduce number of ticks displayed
+ const interval = (info.max - info.min) / tickCount;
+
+ for (let i = 0; i <= tickCount; i++) {
+ positions.push(info.min + i * interval);
+ }
+ return positions;
+ },
},
yAxis: [
{
@@ -203,6 +215,7 @@
],
},
color: "#4681f4",
+ borderColor: "4681f4",
lineWidth: 1.3,
yAxis: 0, // Use primary yAxis
animation: false,
diff --git a/src/lib/components/FinancialTable.svelte b/src/lib/components/FinancialTable.svelte
index 8f07e385..8af88673 100644
--- a/src/lib/components/FinancialTable.svelte
+++ b/src/lib/components/FinancialTable.svelte
@@ -1,9 +1,14 @@
{#each computedFields as { label, key, isMargin } (key)}
@@ -39,14 +155,69 @@
class="dark:sm:hover:bg-[#245073]/10 odd:bg-[#F6F7F8] dark:odd:bg-odd whitespace-nowrap"
>
- {label}
+ {label}
+
|
- {#each data as item, index (index)}
+ {#each data as item}
{formatValue(item[key], isMargin)}
|
{/each}
{/each}
+
+
+
diff --git a/src/routes/pricing/+page.svelte b/src/routes/pricing/+page.svelte
index e76f6d23..7f22cda6 100644
--- a/src/routes/pricing/+page.svelte
+++ b/src/routes/pricing/+page.svelte
@@ -7,7 +7,7 @@
export let data;
export let form;
- let mode = false;
+ let mode = true;
const emailAddress = "support@stocknear.com";
function toggleMode() {
diff --git a/src/routes/stocks/[tickerID]/financials/+layout.server.ts b/src/routes/stocks/[tickerID]/financials/+layout.server.ts
new file mode 100644
index 00000000..4e16922d
--- /dev/null
+++ b/src/routes/stocks/[tickerID]/financials/+layout.server.ts
@@ -0,0 +1,32 @@
+
+
+export const load = async ({ locals, params }) => {
+ const { apiKey, apiURL } = locals;
+ const postData = {
+ ticker: params.tickerID,
+ };
+
+ const getProfileData = async () => {
+
+
+ // make the POST request to the endpoint
+ const response = await fetch(apiURL + "/profile", {
+ method: "POST",
+ headers: {
+ "Content-Type": "application/json",
+ "X-API-KEY": apiKey,
+ },
+ body: JSON.stringify(postData),
+ });
+
+ const output = await response.json();
+
+ return output;
+ };
+
+ // Make sure to return a promise
+ return {
+ getProfileData: await getProfileData(),
+ };
+};
+
diff --git a/src/routes/stocks/[tickerID]/financials/+page.server.ts b/src/routes/stocks/[tickerID]/financials/+page.server.ts
index 8af348bd..6caffc68 100644
--- a/src/routes/stocks/[tickerID]/financials/+page.server.ts
+++ b/src/routes/stocks/[tickerID]/financials/+page.server.ts
@@ -2,15 +2,15 @@ import { error, fail, redirect } from "@sveltejs/kit";
import { validateData } from "$lib/utils";
import { loginUserSchema, registerUserSchema } from "$lib/schemas";
-
-
export const load = async ({ locals, params }) => {
- const getData = async () => {
- const { apiKey, apiURL } = locals;
+ const { apiKey, apiURL } = locals;
const postData = {
ticker: params.tickerID,
};
+
+ const getData = async () => {
+
// make the POST request to the endpoint
const response = await fetch(apiURL + "/stock-income", {
method: "POST",
@@ -26,6 +26,8 @@ export const load = async ({ locals, params }) => {
return output;
};
+
+
// Make sure to return a promise
return {
getData: await getData(),
diff --git a/src/routes/stocks/[tickerID]/financials/+page.svelte b/src/routes/stocks/[tickerID]/financials/+page.svelte
index 427acb70..0d1be354 100644
--- a/src/routes/stocks/[tickerID]/financials/+page.svelte
+++ b/src/routes/stocks/[tickerID]/financials/+page.svelte
@@ -392,7 +392,7 @@
{#if financialData?.length > 0}
{:else}
+
+
+ Financials in {data?.getProfileData?.currency}. Fiscal year
+ is
+ {data?.getProfileData?.fiscalYearRange}.
+
+
+
+
+
+
+
+
+
+ Select time frame
+
+
+
+ ($timeFrame = "5Y")}
+ class="cursor-pointer sm:hover:bg-gray-300 dark:sm:hover:bg-primary"
+ >
+ 5 years
+
+ ($timeFrame = "10Y")}
+ class="cursor-pointer sm:hover:bg-gray-300 dark:sm:hover:bg-primary"
+ >
+ 10 years
+
+ ($timeFrame = "MAX")}
+ class="cursor-pointer sm:hover:bg-gray-300 dark:sm:hover:bg-primary"
+ >
+ Max
+
+
+
+
+
+
+
+