update forecast overview page
This commit is contained in:
parent
6c44831338
commit
04e4c12560
@ -98,7 +98,6 @@ function findIndex(data) {
|
|||||||
const isBeforeStopIndex = index < stopIndex - 1;
|
const isBeforeStopIndex = index < stopIndex - 1;
|
||||||
const isAfterStartIndex = index >= stopIndex - 2;
|
const isAfterStartIndex = index >= stopIndex - 2;
|
||||||
dates.push(`FY${date}`);
|
dates.push(`FY${date}`);
|
||||||
|
|
||||||
switch (displayData) {
|
switch (displayData) {
|
||||||
case "Revenue":
|
case "Revenue":
|
||||||
valueList.push(isBeforeStopIndex ? item.revenue : null);
|
valueList.push(isBeforeStopIndex ? item.revenue : null);
|
||||||
@ -311,7 +310,7 @@ function findIndex(data) {
|
|||||||
<div class="w-full m-auto mt-5 sm:mt-0">
|
<div class="w-full m-auto mt-5 sm:mt-0">
|
||||||
<div class="flex flex-row items-center">
|
<div class="flex flex-row items-center">
|
||||||
<label for="predictiveFundamentalsInfo" class="mr-1 cursor-pointer flex flex-row items-center text-white text-xl sm:text-3xl font-bold">
|
<label for="predictiveFundamentalsInfo" class="mr-1 cursor-pointer flex flex-row items-center text-white text-xl sm:text-3xl font-bold">
|
||||||
Revenue Forecast
|
{displayData} Forecast
|
||||||
</label>
|
</label>
|
||||||
<InfoModal
|
<InfoModal
|
||||||
title={"Predictive Fundamentals"}
|
title={"Predictive Fundamentals"}
|
||||||
|
|||||||
@ -1,10 +1,18 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { numberOfUnreadNotification, displayCompanyName, stockTicker, analystEstimateComponent } from "$lib/store";
|
import { numberOfUnreadNotification, displayCompanyName, stockTicker, analystEstimateComponent } from "$lib/store";
|
||||||
import { abbreviateNumber } from "$lib/utils";
|
import { abbreviateNumber } from "$lib/utils";
|
||||||
import Lazy from "$lib/components/Lazy.svelte";
|
import InfoModal from "$lib/components/InfoModal.svelte";
|
||||||
|
|
||||||
|
import { Chart } from "svelte-echarts";
|
||||||
|
import { init, use } from "echarts/core";
|
||||||
|
import { LineChart } from "echarts/charts";
|
||||||
|
import { GridComponent, TooltipComponent } from "echarts/components";
|
||||||
|
import { CanvasRenderer } from "echarts/renderers";
|
||||||
|
|
||||||
export let data;
|
export let data;
|
||||||
|
use([LineChart, GridComponent, TooltipComponent, CanvasRenderer]);
|
||||||
|
|
||||||
|
|
||||||
function findIndex(data) {
|
function findIndex(data) {
|
||||||
const currentYear = new Date().getFullYear();
|
const currentYear = new Date().getFullYear();
|
||||||
return data.findIndex(item => item.date >= currentYear && item.revenue === null);
|
return data.findIndex(item => item.date >= currentYear && item.revenue === null);
|
||||||
@ -121,13 +129,14 @@ const changeEPS = abbreviateNumber(((data?.getAnalystEstimate[index-1]?.estimate
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<Lazy>
|
|
||||||
<div class="w-full m-auto sm:pb-6 sm:pt-6 {!$analystEstimateComponent ? 'hidden' : ''}">
|
<div class="w-full m-auto sm:pb-6 sm:pt-6 {!$analystEstimateComponent ? 'hidden' : ''}">
|
||||||
{#await import("$lib/components/AnalystEstimate.svelte") then { default: Comp }}
|
{#await import("$lib/components/AnalystEstimate.svelte") then { default: Comp }}
|
||||||
<svelte:component this={Comp} {data} />
|
<svelte:component this={Comp} {data} />
|
||||||
{/await}
|
{/await}
|
||||||
</div>
|
</div>
|
||||||
</Lazy>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user