update analyst page
This commit is contained in:
parent
3833cd71ea
commit
83b200c709
@ -28,8 +28,6 @@
|
|||||||
let lowEPSList = [];
|
let lowEPSList = [];
|
||||||
let highEPSList = [];
|
let highEPSList = [];
|
||||||
|
|
||||||
let highRevenueGrowthList = [];
|
|
||||||
|
|
||||||
let revenueGrowthList = [];
|
let revenueGrowthList = [];
|
||||||
let epsGrowthList = [];
|
let epsGrowthList = [];
|
||||||
|
|
||||||
@ -173,6 +171,23 @@
|
|||||||
|
|
||||||
// Normalize the data if needed (not required in this case, but leaving it here for reference)
|
// Normalize the data if needed (not required in this case, but leaving it here for reference)
|
||||||
|
|
||||||
|
let currentYearSuffix = new Date().getFullYear().toString().slice(-2);
|
||||||
|
let searchString = `FY${currentYearSuffix}`;
|
||||||
|
let currentYearIndex = dates?.findIndex((date) => date === searchString);
|
||||||
|
|
||||||
|
// Assign to global variables based on dataType
|
||||||
|
if (dataType === "Revenue") {
|
||||||
|
revenueDateList = dates?.slice(currentYearIndex) || [];
|
||||||
|
avgRevenueList = avgList?.slice(currentYearIndex) || [];
|
||||||
|
lowRevenueList = lowList?.slice(currentYearIndex) || [];
|
||||||
|
highRevenueList = highList?.slice(currentYearIndex) || [];
|
||||||
|
} else if (dataType === "EPS") {
|
||||||
|
epsDateList = dates?.slice(currentYearIndex) || [];
|
||||||
|
avgEPSList = avgList?.slice(currentYearIndex) || [];
|
||||||
|
lowEPSList = lowList?.slice(currentYearIndex) || [];
|
||||||
|
highEPSList = highList?.slice(currentYearIndex) || [];
|
||||||
|
}
|
||||||
|
|
||||||
const option = {
|
const option = {
|
||||||
silent: true,
|
silent: true,
|
||||||
tooltip: {
|
tooltip: {
|
||||||
@ -309,29 +324,12 @@
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
let currentYearSuffix = new Date().getFullYear().toString().slice(-2);
|
|
||||||
let searchString = `FY${currentYearSuffix}`;
|
|
||||||
|
|
||||||
// Assign to global variables based on dataType
|
|
||||||
if (dataType === "Revenue") {
|
if (dataType === "Revenue") {
|
||||||
let currentYearIndex = dates?.findIndex((date) => date === searchString);
|
|
||||||
optionsRevenue = option;
|
optionsRevenue = option;
|
||||||
optionsRevenueGrowth = optionsGrowth;
|
optionsRevenueGrowth = optionsGrowth;
|
||||||
revenueDateList = dates?.slice(currentYearIndex) || [];
|
|
||||||
avgRevenueList = avgList?.slice(currentYearIndex) || [];
|
|
||||||
lowRevenueList = lowList?.slice(currentYearIndex) || [];
|
|
||||||
highRevenueList = highList?.slice(currentYearIndex) || [];
|
|
||||||
highRevenueGrowthList = highList?.slice(currentYearIndex) || [];
|
|
||||||
} else if (dataType === "EPS") {
|
} else if (dataType === "EPS") {
|
||||||
let currentYearIndex = dates?.findIndex((date) => date === searchString);
|
|
||||||
|
|
||||||
optionsEPS = option;
|
optionsEPS = option;
|
||||||
optionsEPSGrowth = optionsGrowth;
|
optionsEPSGrowth = optionsGrowth;
|
||||||
|
|
||||||
epsDateList = dates?.slice(currentYearIndex) || [];
|
|
||||||
avgEPSList = avgList?.slice(currentYearIndex) || [];
|
|
||||||
lowEPSList = lowList?.slice(currentYearIndex) || [];
|
|
||||||
highEPSList = highList?.slice(currentYearIndex) || [];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user