summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/monitoring/components/graph.vue
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/monitoring/components/graph.vue')
-rw-r--r--app/assets/javascripts/monitoring/components/graph.vue10
1 files changed, 9 insertions, 1 deletions
diff --git a/app/assets/javascripts/monitoring/components/graph.vue b/app/assets/javascripts/monitoring/components/graph.vue
index ea5c24efaf9..2aab8e0afe7 100644
--- a/app/assets/javascripts/monitoring/components/graph.vue
+++ b/app/assets/javascripts/monitoring/components/graph.vue
@@ -52,6 +52,11 @@
type: String,
required: true,
},
+ showLegend: {
+ type: Boolean,
+ required: false,
+ default: true,
+ },
},
data() {
@@ -182,7 +187,9 @@
this.graphHeightOffset,
);
- if (this.timeSeries.length > 3) {
+ if (!this.showLegend) {
+ this.baseGraphHeight -= 60;
+ } else if (this.timeSeries.length > 3) {
this.baseGraphHeight = this.baseGraphHeight += (this.timeSeries.length - 3) * 20;
}
@@ -246,6 +253,7 @@
transform="translate(70, 20)"
/>
<graph-legend
+ v-if="showLegend"
:graph-width="graphWidth"
:graph-height="graphHeight"
:margin="margin"