From ba71c34e523aca5e1331c415774b28806c480ffb Mon Sep 17 00:00:00 2001 From: Alexander Weber Date: Mon, 26 Aug 2024 18:08:40 +0200 Subject: [PATCH] eps forecast limited to two decimal number --- src/lib/components/AnalystEstimate.svelte | 742 ++++++++++------------ 1 file changed, 334 insertions(+), 408 deletions(-) diff --git a/src/lib/components/AnalystEstimate.svelte b/src/lib/components/AnalystEstimate.svelte index 72f38b6f..704fb04b 100644 --- a/src/lib/components/AnalystEstimate.svelte +++ b/src/lib/components/AnalystEstimate.svelte @@ -1,495 +1,421 @@ - - - -
-
-
- -
- - -
- +
+
+
+ + +
-
- We analyze insights from various analysts to offer both historical and future fundamental data forecasts. -
+
We analyze insights from various analysts to offer both historical and future fundamental data forecasts.
- {#if data?.user?.tier === 'Pro'} - {#if isLoaded} + {#if data?.user?.tier === "Pro"} + {#if isLoaded} + {#if analystEstimateList?.length !== 0} + - {#if analystEstimateList?.length !== 0} - - - - - -
- - -
- -
- -
- - -
- -
- - - - Actual - -
- -
- - - - Analyst Forecast - -
-
- - - -
- - - - - {#each xData as item} - - {/each} - - - - - - - - {#each tableDataForecast as item} - - {/each} - - - - - - {#each tableDataActual as item} - - {/each} - - - - - - {#each tableDataActual as item, index} - - {/each} - - - - - - - {#each tableDataForecast as item} - - {/each} - - - - - - -
Year{'FY'+item}
- Forecast - - {(item?.val === '0.00' || item?.val === null || item?.val === 0) ? '-' : abbreviateNumber(item?.val)} -
- Actual - - {(item?.val === '0.00' || item?.val === null || item?.val === 0) ? '-' : abbreviateNumber(item?.val)} -
- % Change - - {#if index === 0 || tableDataActual?.length === 0} - - - {:else} - {#if item?.val === null} - {#if (tableDataForecast[index]?.val - tableDataForecast[index-1]?.val) > 0} - - {(((tableDataForecast[index]?.val - tableDataForecast[index-1]?.val) / Math.abs(tableDataForecast[index-1]?.val)) * 100 )?.toFixed(2)}%* - - {:else if (tableDataForecast[index]?.val - tableDataForecast[index-1]?.val ) < 0} - - {(((tableDataForecast[index]?.val - tableDataForecast[index-1]?.val ) / Math.abs(tableDataForecast[index-1]?.val)) * 100 )?.toFixed(2)}%* - - {/if} - {:else if (item?.val - tableDataActual[index-1]?.val) > 0} - - {(((item?.val - tableDataActual[index-1]?.val) / Math.abs(tableDataActual[index-1]?.val)) * 100 )?.toFixed(2)}% - - {:else if (item?.val - tableDataActual[index-1]?.val ) < 0} - - {(((item?.val - tableDataActual[index-1]?.val ) / Math.abs(tableDataActual[index-1]?.val)) * 100 )?.toFixed(2)}% - - {:else} - 0.00% - {/if} - {/if} -
- No. Analysts - - {item?.numOfAnalysts === (null || 0) ? '-' : item?.numOfAnalysts} -
- - -
- -
- * This value depends on the forecast -
-
- - For the current Fiscal Year we use available quarterly data. Complete annual data, used to compare against analyst estimates, is only finalized after the year ends. -
- - - {/if} - - {:else} -
-
- -
-
- {/if} - - {:else} -
- - Unlock content with Pro Subscription +
+
+
- {/if} -
-
+
+
+ + + Actual +
+ +
+ + + Analyst Forecast +
+
+ +
+ + + + + {#each xData as item} + + {/each} + + + + + + {#each tableDataForecast as item} + + {/each} + + + + + {#each tableDataActual as item} + + {/each} + + + + + {#each tableDataActual as item, index} + + {/each} + + + + + {#each tableDataForecast as item} + + {/each} + + +
Year{"FY" + item}
Forecast + {item?.val === "0.00" || item?.val === null || item?.val === 0 ? "-" : abbreviateNumber(item?.val.toFixed(2))} +
Actual + {item?.val === "0.00" || item?.val === null || item?.val === 0 ? "-" : abbreviateNumber(item?.val)} +
% Change + {#if index === 0 || tableDataActual?.length === 0} + - + {:else if item?.val === null} + {#if tableDataForecast[index]?.val - tableDataForecast[index - 1]?.val > 0} + + {(((tableDataForecast[index]?.val - tableDataForecast[index - 1]?.val) / Math.abs(tableDataForecast[index - 1]?.val)) * 100)?.toFixed(2)}%* + + {:else if tableDataForecast[index]?.val - tableDataForecast[index - 1]?.val < 0} + + {(((tableDataForecast[index]?.val - tableDataForecast[index - 1]?.val) / Math.abs(tableDataForecast[index - 1]?.val)) * 100)?.toFixed(2)}%* + + {/if} + {:else if item?.val - tableDataActual[index - 1]?.val > 0} + + {(((item?.val - tableDataActual[index - 1]?.val) / Math.abs(tableDataActual[index - 1]?.val)) * 100)?.toFixed(2)}% + + {:else if item?.val - tableDataActual[index - 1]?.val < 0} + + {(((item?.val - tableDataActual[index - 1]?.val) / Math.abs(tableDataActual[index - 1]?.val)) * 100)?.toFixed(2)}% + + {:else} + 0.00% + {/if} +
No. Analysts + {item?.numOfAnalysts === (null || 0) ? "-" : item?.numOfAnalysts} +
+
+ +
* This value depends on the forecast
+
+ + For the current Fiscal Year we use available quarterly data. Complete annual data, used to compare against analyst estimates, is only finalized after the year ends. +
+ {/if} + {:else} +
+
+ +
+
+ {/if} + {:else} +
+ + Unlock content with + Pro Subscription +
+ {/if} +
+
- - - \ No newline at end of file + .chart { + width: 100%; + } +