Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Metagenomics
metagenedb
Commits
584a5f59
Commit
584a5f59
authored
Dec 04, 2019
by
Kenzo-Hugo Hillion
♻
Browse files
clean code
parent
925b5b5e
Pipeline
#19269
passed with stages
in 2 minutes and 10 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
frontend/src/components/Doughnut.vue
View file @
584a5f59
...
...
@@ -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
>
frontend/src/components/Histogram.vue
View file @
584a5f59
...
...
@@ -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
>
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment