From 90446f476a05e7d8284e6a703dbc1df45850a1b9 Mon Sep 17 00:00:00 2001 From: MuslemRahimi Date: Tue, 11 Mar 2025 23:03:08 +0100 Subject: [PATCH] ui fix --- package-lock.json | 8 +++---- package.json | 2 +- src/routes/market-flow/+page.svelte | 21 ++++++++++--------- .../market-flow/sector-flow/+page.svelte | 21 ++++++++++--------- 4 files changed, 27 insertions(+), 25 deletions(-) diff --git a/package-lock.json b/package-lock.json index e3b710b5..8231b67a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -34,7 +34,7 @@ "clsx": "^2.1.1", "cmdk-sv": "^0.0.18", "compression": "^1.7.4", - "daisyui": "^5.0.0", + "daisyui": "^5.0.2", "date-fns": "^3.6.0", "date-fns-tz": "^3.1.3", "date-picker-svelte": "^2.12.0", @@ -4081,9 +4081,9 @@ "license": "BSD-3-Clause" }, "node_modules/daisyui": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/daisyui/-/daisyui-5.0.0.tgz", - "integrity": "sha512-U0K9Bac3Bi3zZGm6ojrw12F0vBHTpEgf46zv/BYxLe07hF0Xnx7emIQliwaRBgJuYhY0BhwQ6wSnq5cJXHA2yA==", + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/daisyui/-/daisyui-5.0.2.tgz", + "integrity": "sha512-AfOlwcE+Ukwuh2NSrMDE8VXOl9UWidj2Q5f64DEYqtZVW0Z9pELBA50iGEKg2FpBUvztFY5DFv7+eZgRts70BA==", "dev": true, "license": "MIT", "funding": { diff --git a/package.json b/package.json index e9b39029..10d499c8 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "clsx": "^2.1.1", "cmdk-sv": "^0.0.18", "compression": "^1.7.4", - "daisyui": "^5.0.0", + "daisyui": "^5.0.2", "date-fns": "^3.6.0", "date-fns-tz": "^3.1.3", "date-picker-svelte": "^2.12.0", diff --git a/src/routes/market-flow/+page.svelte b/src/routes/market-flow/+page.svelte index e87ff90f..b90fbb6e 100644 --- a/src/routes/market-flow/+page.svelte +++ b/src/routes/market-flow/+page.svelte @@ -285,20 +285,21 @@ }, borderRadius: 4, formatter: function () { - // Format the x value to display time in hh:mm format - let tooltipContent = `${new Date( - this.x, - ).toLocaleTimeString("en-US", { - hour: "2-digit", - minute: "2-digit", + // Format the x value to display time in a custom format + let tooltipContent = `${new Date( + this?.x, + ).toLocaleDateString("en-US", { + year: "numeric", + month: "short", + day: "numeric", })}
`; // Loop through each point in the shared tooltip this.points.forEach((point) => { - tooltipContent += `${point.series.name}: - ${abbreviateNumber( - point.y, - )}
`; + tooltipContent += ` + + ${point.series.name}: + ${abbreviateNumber(point.y)}
`; }); return tooltipContent; diff --git a/src/routes/market-flow/sector-flow/+page.svelte b/src/routes/market-flow/sector-flow/+page.svelte index 6bbec898..4eebff4f 100644 --- a/src/routes/market-flow/sector-flow/+page.svelte +++ b/src/routes/market-flow/sector-flow/+page.svelte @@ -310,20 +310,21 @@ }, borderRadius: 4, formatter: function () { - // Format the x value to display time in hh:mm format - let tooltipContent = `${new Date( - this.x, - ).toLocaleTimeString("en-US", { - hour: "2-digit", - minute: "2-digit", + // Format the x value to display time in a custom format + let tooltipContent = `${new Date( + this?.x, + ).toLocaleDateString("en-US", { + year: "numeric", + month: "short", + day: "numeric", })}
`; // Loop through each point in the shared tooltip this.points.forEach((point) => { - tooltipContent += `${point.series.name}: - ${abbreviateNumber( - point.y, - )}
`; + tooltipContent += ` + + ${point.series.name}: + ${abbreviateNumber(point.y)}
`; }); return tooltipContent;