master #173
@ -1,9 +1,23 @@
|
||||
<!----------------------------------------------------
|
||||
File: ResearcherProfile.vue
|
||||
Author: Maxime Bartha
|
||||
Scope: Extension Publicatons scientifiquess
|
||||
Description: Researcher Profile Page containing his articles and his statistics
|
||||
----------------------------------------------------->
|
||||
|
||||
<script setup>
|
||||
import { ref } from "vue";
|
||||
const input = ref("");
|
||||
const statsOf = ref("");
|
||||
const statsBy = ref("");
|
||||
|
||||
const jsonMockViewsByYears= [
|
||||
{label: "2004", y:4},
|
||||
{label: "2005", y:99},
|
||||
{label: "2007", y:555},
|
||||
{label: "2009", y:22},
|
||||
{label: "2011", y:1666},
|
||||
]
|
||||
|
||||
function inputKeyUp() {
|
||||
let filter, ul, li, a, txtValue;
|
||||
@ -33,7 +47,7 @@ const mydata = {
|
||||
animationEnabled: true,
|
||||
title: {
|
||||
fontColor: "white",
|
||||
text: statsOf.value + " By "+ statsBy.value,
|
||||
text : "please select options",
|
||||
},
|
||||
data: [
|
||||
{
|
||||
@ -43,14 +57,6 @@ const mydata = {
|
||||
indexLabelFontColor: "white",
|
||||
toolTipContent:
|
||||
"<span style='\"'color: {color};'\"'>{label}</span> {y}(#percent%)",
|
||||
dataPoints: [
|
||||
{ label: "Organic Traffic", y: 130631 },
|
||||
{ label: "Direct", y: 28874 },
|
||||
{ label: "Referral", y: 15467 },
|
||||
{ label: "Social", y: 10543 },
|
||||
{ label: "Email", y: 5613 },
|
||||
{ label: "Others", y: 8492 },
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
@ -60,16 +66,21 @@ const mydata = {
|
||||
},
|
||||
methods : {
|
||||
chartInstance(chart){
|
||||
mydata.chart = chart
|
||||
mydata.chart = chart;
|
||||
},
|
||||
update(){
|
||||
mydata.options.title = {
|
||||
fontColor: "white",
|
||||
text: statsOf.value + " By "+ statsBy.value,
|
||||
}
|
||||
if (statsOf.value === "views" && statsBy.value === "years") {
|
||||
console.log("yeasear")
|
||||
mydata.options.data[0].dataPoints = jsonMockViewsByYears;
|
||||
}
|
||||
|
||||
console.log(mydata.options.data)
|
||||
mydata.options.title.text = statsOf.value + " By "+ statsBy.value;
|
||||
mydata.chart.render()
|
||||
console.log(mydata.options.title)
|
||||
setTimeout(this.update, 1000);
|
||||
}
|
||||
}
|
||||
};
|
@ -9,7 +9,7 @@ import Profil from "@/Apps/Profil.vue"
|
||||
import Courses from "@/Apps/ManageCourses.vue"
|
||||
import Users from "@/Apps/UsersList.vue"
|
||||
import Students from "@/Apps/StudentsList.vue"
|
||||
import ResearcherProfile from "@/Apps/ResearcherProfile.vue";
|
||||
import ResearcherProfile from "@/Apps/ScientificPublications/ResearcherProfile.vue";
|
||||
|
||||
const apps = {
|
||||
'/login': LoginPage,
|
||||
|
Loading…
Reference in New Issue
Block a user