diff --git a/src/lib/components/BorrowedShare.svelte b/src/lib/components/BorrowedShare.svelte index 9afe320f..ada519cd 100644 --- a/src/lib/components/BorrowedShare.svelte +++ b/src/lib/components/BorrowedShare.svelte @@ -221,7 +221,7 @@ function findLowestAndHighestFee(data, lastDateStr) { - +
diff --git a/src/routes/home/+page.svelte b/src/routes/home/+page.svelte index 674ed4d2..b18a34c5 100644 --- a/src/routes/home/+page.svelte +++ b/src/routes/home/+page.svelte @@ -2,7 +2,6 @@ import { onMount } from 'svelte'; - import * as Avatar from "$lib/components/shadcn/avatar/index.js"; import * as Card from "$lib/components/shadcn/card/index.ts"; import * as Table from "$lib/components/shadcn/table/index.ts"; import ArrowUpRight from "lucide-svelte/icons/arrow-up-right"; @@ -10,9 +9,11 @@ import Bomb from "lucide-svelte/icons/bomb"; import Crown from "lucide-svelte/icons/crown"; import Activity from "lucide-svelte/icons/activity"; - import { abbreviateNumber, formatDate, formatString } from '$lib/utils'; + import { abbreviateNumber, formatDate } from '$lib/utils'; - import { numberOfUnreadNotification} from '$lib/store'; + import { numberOfUnreadNotification, screenWidth} from '$lib/store'; + import { Chart } from 'svelte-echarts'; + import Lazy from 'svelte-lazy'; export let data; @@ -39,7 +40,62 @@ function latestInfoDate(inputDate) { return differenceInDays <=1; } +const tickerGraphName = data?.getDashboard?.retailTracker?.map(item => item?.symbol) || []; +const tradedList = data?.getDashboard?.retailTracker?.map(item => item?.traded) || []; +const optionsGraph = { + animation: $screenWidth < 640 ? false: true, + grid: { + left: '2%', + right: '3%', + bottom: '6%', + top: '0%', + containLabel: true + }, + xAxis: { + type: 'value', + splitLine: { + show: false, // Disable x-axis grid lines + }, + axisLabel: { + show: false // Hide x-axis labels + }, + axisTick: { + show: false // Hide x-axis ticks + }, + axisLine: { + show: false // Hide x-axis line + } + }, + yAxis: { + type: 'category', + data: tickerGraphName, + inverse: true, + axisTick: { + show: false // Hide x-axis ticks + }, + }, + series: [ + { + data: tradedList, + label: { + show: true, + position: 'inside', + formatter: function(params) { + return abbreviateNumber(params?.value,true); + } + }, + type: 'bar', + showBackground: true, + backgroundStyle: { + color: 'rgba(180, 180, 180, 0.2)' + }, + itemStyle: { + color: 'white' // Bar color is white + } + } + ] +}; let Feedback; @@ -49,12 +105,10 @@ onMount( async() => { - - @@ -76,12 +130,13 @@ onMount( async() => { +
-
+
{#if Feedback} @@ -177,8 +232,9 @@ onMount( async() => {
-
- +
+ +
@@ -229,45 +285,32 @@ onMount( async() => { - - - - - Latest Congress Trading - - - View All - - - - - {#each data?.getDashboard?.congressFlow as item} -
- - - OM - -
-

{item?.representative?.replace('Dr','')}

-

{item?.party ?? 'n/a'}

-
-
- - {item?.ticker?.length !== 0 ? item?.ticker : formatString(item?.assetDescription)?.slice(0,15) + '...'} + + + +
+
+ Retail Trader Tracker + + View All + - -

{item?.amount?.replace("$1,000,001 - $5,000,000","$1Mio - $5Mio")}

-

- {#if item?.type === 'Bought'} - Bought - {:else if item?.type === 'Sold'} - Sold - {/if} -

+ Latest Retail Trader investing behavior to identify market trends.
- {/each} + + +
+ + + +
+ +
+
+ +
+
@@ -367,7 +410,21 @@ onMount( async() => {