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