Skip to content
Snippets Groups Projects
Commit 584a5f59 authored by Kenzo-Hugo Hillion's avatar Kenzo-Hugo Hillion ♻️
Browse files

clean code

parent 925b5b5e
No related branches found
No related tags found
2 merge requests!59Prod,!23Add more statistical graph about gene catalog
Pipeline #19269 passed
......@@ -58,21 +58,6 @@ export default {
noGraph: true,
}
},
watch: {
doughnutData(val) {
if (this.noGraph) {
this.noGraph = false;
this.createChart();
}
this.updateChart();
},
hideLegend(val) {
this.updateChartOptions();
},
hideLabels() {
this.updateChartData();
}
},
computed: {
hideLabelsLabel() {
if (Object.entries(this.doughnutData).length == 0) {
......@@ -138,5 +123,20 @@ export default {
this.myChart.update();
},
},
watch: {
doughnutData(val) {
if (this.noGraph) {
this.noGraph = false;
this.createChart();
}
this.updateChart();
},
hideLegend(val) {
this.updateChartOptions();
},
hideLabels() {
this.updateChartData();
}
},
};
</script>
......@@ -32,15 +32,6 @@ export default {
noGraph: true,
}
},
watch: {
histoData(val) {
if (this.noGraph) {
this.noGraph = false;
this.createChart();
}
this.updateChart();
},
},
methods: {
createChart() {
const ctx = document.getElementById(this.chartId);
......@@ -66,5 +57,14 @@ export default {
this.myChart.update();
},
},
watch: {
histoData(val) {
if (this.noGraph) {
this.noGraph = false;
this.createChart();
}
this.updateChart();
},
},
};
</script>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment