From 918e670bd1dd856af56fcb24a4c73c107d9c6e09 Mon Sep 17 00:00:00 2001
From: MuslemRahimi
Date: Mon, 5 Aug 2024 10:59:52 +0200
Subject: [PATCH] bugfixing && ui fix
---
src/lib/components/ReturnCard.svelte | 62 +++++++++--------
.../stocks/[tickerID]/stats/+page.svelte | 66 ++++++++++---------
2 files changed, 67 insertions(+), 61 deletions(-)
diff --git a/src/lib/components/ReturnCard.svelte b/src/lib/components/ReturnCard.svelte
index 072bfd22..2f80dfc1 100644
--- a/src/lib/components/ReturnCard.svelte
+++ b/src/lib/components/ReturnCard.svelte
@@ -57,8 +57,8 @@
const options = {
grid: {
- left: "0%",
- right: "7%",
+ left: "2%",
+ right: "2%",
bottom: '0%',
height: "90%",
containLabel: true,
@@ -185,7 +185,10 @@
{
name: 'Frequency of Return',
type: 'bar',
- barWidth: '100%',
+ barWidth: '80%',
+ itemStyle: {
+ color: 'white',
+ },
data: histogramData
}
],
@@ -259,7 +262,7 @@
-
+
{#if displayReturn === 'annualReturn'}
@@ -288,8 +291,8 @@
-
-
+
+
@@ -300,9 +303,11 @@
Distribution of Monthly Returns
-
-
-
+
+
+
+
+
{/if}
@@ -310,23 +315,22 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/src/routes/stocks/[tickerID]/stats/+page.svelte b/src/routes/stocks/[tickerID]/stats/+page.svelte
index fa3d3631..5bae3978 100644
--- a/src/routes/stocks/[tickerID]/stats/+page.svelte
+++ b/src/routes/stocks/[tickerID]/stats/+page.svelte
@@ -287,38 +287,40 @@ updateYearRange()
Worst 10 Drawdowns of {$stockTicker}
-
-
-
- | Started |
- Recovered |
- Drawdown |
- Days |
-
-
-
- {#each quantStats[$stockTicker?.toUpperCase()]['Worst 10 Drawdowns'] as item}
-
- |
- {new Date(item['Started']).toLocaleString('en-US', { month: 'short', day: 'numeric', year: 'numeric', daySuffix: '2-digit' })}
- |
-
- {#if ongoingDD(item['Recovered']) === true}
- continuing
- {:else}
- {new Date(item['Recovered']).toLocaleString('en-US', { month: 'short', day: 'numeric', year: 'numeric', daySuffix: '2-digit' })}
- {/if}
- |
-
- {item['Drawdown']?.toFixed(2)}%
- |
-
- {item['Days']}
- |
+
+
@@ -330,7 +332,7 @@ updateYearRange()
Comparison of company stats against the S&P500 Index.
-
+
Time Period between {new Date(quantStats[$stockTicker?.toUpperCase()]["Start Period"]).toLocaleString('en-US', { month: 'long', day: 'numeric', year: 'numeric', daySuffix: '2-digit' })}
-
{new Date(quantStats[$stockTicker?.toUpperCase()]["End Period"]).toLocaleString('en-US', { month: 'long', day: 'numeric', year: 'numeric', daySuffix: '2-digit' })}