fixed stats and added views in researchComp

This commit is contained in:
2024-04-17 12:37:14 +02:00
parent 24f82812f4
commit 5c0dfa3596
2 changed files with 5 additions and 4 deletions

View File

@ -117,10 +117,10 @@ function update(){
fontColor: "white",
text: statsOf.value + " By "+ statsBy.value,
}
const index = (0 ?statsOf.value === "views": 3 ? statsOf.value === "researches":6) + (0?statsBy.value ==="years":1?statsBy.value==="months":2)
let index = (statsOf.value === "views"?0:(statsOf.value === "researches"?3:6)) + (statsBy.value ==="years"?0:(statsBy.value==="months"?1:2))
options.data[0].dataPoints = stats.value[index]
if (statsOf.value !== "" && statsBy.value !== "")
options.data[0].dataPoints = stats.value[index]
options.title.text = statsOf.value + " By "+ statsBy.value;