analyst estimate bug fixing
This commit is contained in:
parent
767f1be59f
commit
fdd8ecaf3e
@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
function changeStatement(event) {
|
function changeStatement(event) {
|
||||||
@ -63,8 +63,8 @@
|
|||||||
if (filteredData) {
|
if (filteredData) {
|
||||||
filteredData.forEach((item, index) => {
|
filteredData.forEach((item, index) => {
|
||||||
const date = item.date?.toString().slice(-2);
|
const date = item.date?.toString().slice(-2);
|
||||||
const isBeforeStopIndex = index < stopIndex - 1;
|
const isBeforeStopIndex = index < stopIndex;
|
||||||
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":
|
||||||
@ -97,6 +97,7 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const lastValue = valueList[stopIndex - 2];
|
const lastValue = valueList[stopIndex - 2];
|
||||||
avgList[stopIndex - 2] = lastValue;
|
avgList[stopIndex - 2] = lastValue;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user