7 Commits

Author SHA1 Message Date
05359d64ac Merge remote-tracking branch 'origin/master' 2024-04-05 09:06:01 +02:00
9e0db361b8 Merge pull request 'Make app use full space' (#148) from tonitch/front/fullSpaceApp into master
All checks were successful
Build and test backend / Build-backend (push) Successful in 2m26s
deploy to production / deploy-frontend (push) Successful in 27s
deploy to production / deploy-backend (push) Successful in 2m5s
Build and test FrontEnd / Build-frontend (push) Successful in 24s
Reviewed-on: #148
Reviewed-by: Wal <karpinskiwal@gmail.com>
Reviewed-by: Maxime <231026@umons.ac.be>
2024-03-24 22:32:46 +01:00
7a13d412f1 Full screen apps
All checks were successful
Build and test backend / Build-backend (pull_request) Successful in 1m48s
Build and test FrontEnd / Build-frontend (pull_request) Successful in 24s
2024-03-23 23:56:24 +01:00
9de4b06e75 Login 'fixed'
All checks were successful
Build and test backend / Build-backend (pull_request) Successful in 2m53s
Build and test FrontEnd / Build-frontend (pull_request) Successful in 26s
2024-03-23 13:57:46 +01:00
123fa97611 Merge branch 'wal/front/temp' into tonitch/front/fullSpaceApp 2024-03-22 20:15:45 +01:00
1fad792be7 Just to merge 2024-03-22 20:14:20 +01:00
acd1262955 Make app use full space
All checks were successful
Build and test backend / Build-backend (pull_request) Successful in 1m50s
Build and test FrontEnd / Build-frontend (pull_request) Successful in 24s
2024-03-22 13:56:04 +01:00

View File

@ -6,11 +6,10 @@
----------------------------------------------------->
<script setup>
import { ref, reactive } from "vue";
import { ref } from "vue";
const input = ref("");
const statsOf = ref("");
const statsBy = ref("");
let chart;
const jsonMockViewsByYears= [
{label: "2004", y:4},
@ -40,7 +39,9 @@ function inputKeyUp() {
}
}
const options = reactive({
const mydata = {
chart:null,
options: {
backgroundColor:null,
theme: "light2",
animationEnabled: true,
@ -56,21 +57,33 @@ const options = reactive({
indexLabelFontColor: "white",
toolTipContent:
"<span style='\"'color: {color};'\"'>{label}</span> {y}(#percent%)",
}]
});
function update(){
options.title = {
},
],
},
styleOptions: {
width: "100%",
height: "100%",
},
methods : {
chartInstance(chart){
mydata.chart = chart;
},
update(){
mydata.options.title = {
fontColor: "white",
text: statsOf.value + " By "+ statsBy.value,
}
if (statsOf.value === "views" && statsBy.value === "years") {
options.data[0].dataPoints = jsonMockViewsByYears;
console.log("yeasear")
mydata.options.data[0].dataPoints = jsonMockViewsByYears;
}
options.title.text = statsOf.value + " By "+ statsBy.value;
chart.render()
console.log(mydata.options.data)
mydata.options.title.text = statsOf.value + " By "+ statsBy.value;
mydata.chart.render()
}
}
};
</script>
<template>
@ -93,7 +106,7 @@ function update(){
<div id="stats">
<div class="surrounded">
Stat type :
<select @change="update()" id="stats-select" v-model="statsOf">
<select @change="mydata.methods.update()" name="stats" id="stats-select" v-model="statsOf">
<option value="views">Views</option>
<option value="co-authors">Co-authors</option>
<option value="articles">Articles</option>
@ -102,21 +115,21 @@ function update(){
</div>
<div class="surrounded">
Class by:
<select @change="update()" id="classed-select" v-model="statsBy">
<select @change="mydata.methods.update()" name="classedBy" id="classed-select" v-model="statsBy">
<option selected="selected" value="years">Years</option>
<option value="months">Months</option>
<option value="topics">Topics</option>
</select>
</div>
<div id="statsPie">
<CanvasJSChart :options="options" id=chart @chart-ref="c => chart = c "/>
<CanvasJSChart :options="mydata.options" :style="mydata.styleOptions" @chart-ref="mydata.methods.chartInstance"/>
</div>
</div>
<div id="articles">
<input
type="text"
id="search-input"
@keyup="inputKeyUp()"
:onkeyup="inputKeyUp()"
placeholder="search articles"
v-model="input"
/>
@ -228,9 +241,4 @@ function update(){
#myUL li a:hover:not(.header) {
background-color: #eee;
}
#Chart{
width: "100%";
height: "100%";
}
</style>