mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 13:27:08 +00:00
Don't show graph if there is no data
This commit is contained in:
@@ -258,8 +258,13 @@ export default {
|
||||
methods: {
|
||||
|
||||
plot () {
|
||||
Plotly.newPlot(this.$refs.graph, this.data, this.layout, this.config);
|
||||
this.plotted = true;
|
||||
if (this.items?.length) {
|
||||
Plotly.newPlot(this.$refs.graph, this.data, this.layout, this.config);
|
||||
this.plotted = true;
|
||||
} else {
|
||||
Plotly.purge(this.$refs.graph);
|
||||
this.plotted = false;
|
||||
}
|
||||
},
|
||||
|
||||
replot () {
|
||||
|
||||
@@ -141,8 +141,13 @@ export default {
|
||||
methods: {
|
||||
|
||||
plot () {
|
||||
Plotly.newPlot(this.$refs.graph, this.data, this.layout, this.config);
|
||||
this.plotted = true;
|
||||
if (this.items?.length) {
|
||||
Plotly.newPlot(this.$refs.graph, this.data, this.layout, this.config);
|
||||
this.plotted = true;
|
||||
} else {
|
||||
Plotly.purge(this.$refs.graph);
|
||||
this.plotted = false;
|
||||
}
|
||||
},
|
||||
|
||||
replot () {
|
||||
|
||||
Reference in New Issue
Block a user