bugfixing
This commit is contained in:
parent
03ac4fe593
commit
0e7d4e9592
@ -7,20 +7,19 @@
|
|||||||
export let data;
|
export let data;
|
||||||
|
|
||||||
const excludedRules = new Set([
|
const excludedRules = new Set([
|
||||||
"volume",
|
|
||||||
"price",
|
|
||||||
"upside",
|
"upside",
|
||||||
"priceTarget",
|
"priceTarget",
|
||||||
"marketCap",
|
"marketCap",
|
||||||
"changesPercentage",
|
"analystCounter",
|
||||||
|
"analystRating"
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const defaultList = [
|
const defaultList = [
|
||||||
{ name: "Ratings Count", rule: "counter" },
|
{ name: "Analyst Count", rule: "analystCounter" },
|
||||||
{ name: "Price Target", rule: "priceTarget" },
|
|
||||||
{ name: "Price", rule: "price" },
|
|
||||||
{ name: "% Change", rule: "changesPercentage" },
|
|
||||||
{ name: "Upside", rule: "upside" },
|
{ name: "Upside", rule: "upside" },
|
||||||
|
{ name: "Price Target", rule: "priceTarget" },
|
||||||
|
{ name: "Market Cap", rule: "marketCap" },
|
||||||
|
{name: 'Analyst Rating', rule: 'analystRating'}
|
||||||
];
|
];
|
||||||
const hideLastRow = true;
|
const hideLastRow = true;
|
||||||
</script>
|
</script>
|
||||||
@ -30,7 +29,7 @@
|
|||||||
<meta name="viewport" content="width=device-width" />
|
<meta name="viewport" content="width=device-width" />
|
||||||
<title>
|
<title>
|
||||||
{$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} Top
|
{$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} Top
|
||||||
100 Strong Buy Stocks · Stocknear
|
Top Analyst Strong Buy Stocks · Stocknear
|
||||||
</title>
|
</title>
|
||||||
<meta
|
<meta
|
||||||
name="description"
|
name="description"
|
||||||
|
|||||||
@ -96,7 +96,7 @@
|
|||||||
})
|
})
|
||||||
?.slice(0, 30); //Consider only the last 30 ratings in the last 12 months
|
?.slice(0, 30); //Consider only the last 30 ratings in the last 12 months
|
||||||
|
|
||||||
const filteredAnalystCount = recentData.length;
|
const filteredAnalystCount = recentData?.length;
|
||||||
const priceTargets = recentData
|
const priceTargets = recentData
|
||||||
?.map((item) => parseFloat(item.adjusted_pt_current))
|
?.map((item) => parseFloat(item.adjusted_pt_current))
|
||||||
?.filter((pt) => !isNaN(pt));
|
?.filter((pt) => !isNaN(pt));
|
||||||
@ -110,10 +110,10 @@
|
|||||||
priceTarget = medianPriceTarget;
|
priceTarget = medianPriceTarget;
|
||||||
changesPercentage =
|
changesPercentage =
|
||||||
medianPriceTarget !== "-" && data?.getStockQuote?.price != null
|
medianPriceTarget !== "-" && data?.getStockQuote?.price != null
|
||||||
? ((medianPriceTarget / data.getStockQuote.price - 1) * 100).toFixed(
|
? ((medianPriceTarget / data?.getStockQuote.price - 1) * 100).toFixed(
|
||||||
2,
|
2,
|
||||||
)
|
)
|
||||||
: "-";
|
: "n/a";
|
||||||
|
|
||||||
// Consensus rating calculation based on rating_current
|
// Consensus rating calculation based on rating_current
|
||||||
const ratingScores = {
|
const ratingScores = {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user