diff --git a/src/routes/reddit-tracker/+page.svelte b/src/routes/reddit-tracker/+page.svelte index 5c4e8f5e..28e9a6f3 100644 --- a/src/routes/reddit-tracker/+page.svelte +++ b/src/routes/reddit-tracker/+page.svelte @@ -84,6 +84,7 @@ function getPlotOptions() { const optionPost = { silent: true, + animation: $screenWidth < 640 ? false: true, tooltip: { trigger: 'axis', hideDelay: 100, // Set the delay in milliseconds @@ -92,7 +93,7 @@ function getPlotOptions() { left: '3%', right: '4%', bottom: '0%', - top: '5%', + top: $screenWidth < 640 ? '20%' : '10%', containLabel: true }, xAxis: [ @@ -142,6 +143,7 @@ function getPlotOptions() { const optionComment = { silent: true, + animation: $screenWidth < 640 ? false: true, tooltip: { trigger: 'axis', hideDelay: 100, // Set the delay in milliseconds @@ -150,7 +152,7 @@ const optionComment = { left: '3%', right: '4%', bottom: '0%', - top: '5%', + top: $screenWidth < 640 ? '20%' : '10%', containLabel: true }, xAxis: [ @@ -200,6 +202,7 @@ const optionComment = { const optionCompanySpread = { silent: true, + animation: $screenWidth < 640 ? false: true, tooltip: { trigger: 'axis', hideDelay: 100, // Set the delay in milliseconds @@ -208,7 +211,7 @@ const optionCompanySpread = { left: '3%', right: '4%', bottom: '0%', - top: '10%', + top: $screenWidth < 640 ? '20%' : '10%', containLabel: true }, xAxis: [ @@ -262,17 +265,6 @@ const optionCompanySpread = { }) - let charNumber = 40; - $: { - if ($screenWidth < 640) - { - charNumber = 15; - } - else { - charNumber = 40; - } - } - @@ -317,7 +309,7 @@ const optionCompanySpread = {