diff --git a/src/routes/stocks/[tickerID]/dividends/+page.svelte b/src/routes/stocks/[tickerID]/dividends/+page.svelte index 3b7fc497..acc917e7 100644 --- a/src/routes/stocks/[tickerID]/dividends/+page.svelte +++ b/src/routes/stocks/[tickerID]/dividends/+page.svelte @@ -38,13 +38,13 @@ async function plotDividend(dividendList, growthList, dateList) { hideDelay: 100, // Set the delay in milliseconds }, animation: false, - grid: { + grid: { left: '2%', - right: '2%', - bottom: '2%', - top: '5%', + right: '0%', + bottom: '10%', + top: '10%', containLabel: true - }, + }, xAxis: { data: dateList, type: 'category', @@ -80,24 +80,8 @@ async function plotDividend(dividendList, growthList, dateList) { { name: 'Dividend per Share', data: dividendList, - type: 'line', - itemStyle: { - color: '#fff' // Change bar color to white - }, - showSymbol: false - }, - { - name: 'Growth Rate (%)', - data: growthList, type: 'bar', - barWidth: '80%', - yAxisIndex: 1, - itemStyle: { - color: (params) => { - // Set color based on positive or negative value - return params.data >= 0 ? '#22C55E' : '#E11D48'; - }, - }, + smooth: true, }, ], }; @@ -181,7 +165,7 @@ onMount(async() => { -
+
@@ -306,7 +290,7 @@ onMount(async() => { {#if stockDividends?.length !== 0 && optionsDividend} -
+
@@ -375,21 +359,21 @@ onMount(async() => { - \ No newline at end of file + .chart { + width: 100%; + } + \ No newline at end of file diff --git a/src/routes/stocks/[tickerID]/insider/+page.svelte b/src/routes/stocks/[tickerID]/insider/+page.svelte index d3144221..5533d355 100644 --- a/src/routes/stocks/[tickerID]/insider/+page.svelte +++ b/src/routes/stocks/[tickerID]/insider/+page.svelte @@ -208,7 +208,7 @@ const handleMessage = async (event) => { { name: '', data: soldList, - type: 'line', + type: 'bar', areaStyle: {opacity: 1}, yAxisIndex: 1, itemStyle: { @@ -221,7 +221,7 @@ const handleMessage = async (event) => { { name: '', data: boughtList, - type: 'line', + type: 'bar', areaStyle: {opacity: 1}, yAxisIndex: 1, itemStyle: { @@ -234,7 +234,7 @@ const handleMessage = async (event) => { { name: '', data: grantList, - type: 'line', + type: 'bar', yAxisIndex: 1, areaStyle: {opacity: 1}, itemStyle: { @@ -247,7 +247,7 @@ const handleMessage = async (event) => { { name: '', data: exerciseList, - type: 'line', + type: 'bar', areaStyle: {opacity: 1}, yAxisIndex: 1, itemStyle: { @@ -365,7 +365,7 @@ onMount(async() => { {#if insiderTradingList?.length !== 0} {#if Object?.keys(options)?.length !== 0} -
+
@@ -611,21 +611,20 @@ onMount(async() => { - - \ No newline at end of file + + @media (max-width: 560px) { + .app { + width: 100%; + height: 300px; + } + } + + .chart { + width: 100%; + } + \ No newline at end of file