Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorMike Greiling <mike@pixelcog.com>2017-11-05 07:51:45 +0300
committerMike Greiling <mike@pixelcog.com>2017-11-06 23:07:09 +0300
commitb7273c10ea91c71c8d0eb1d9ecde7983839ffae7 (patch)
treeeab44e0af0891697c8f5ffa54603557fa9c44c23 /app
parent045795d0d93dfe426cac668d612aa031114df930 (diff)
fix bug in which axes are scaled only to first data set
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/monitoring/components/graph.vue5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/assets/javascripts/monitoring/components/graph.vue b/app/assets/javascripts/monitoring/components/graph.vue
index 5aa3865f96a..d3174bceb08 100644
--- a/app/assets/javascripts/monitoring/components/graph.vue
+++ b/app/assets/javascripts/monitoring/components/graph.vue
@@ -153,8 +153,9 @@
const axisYScale = d3.scale.linear()
.range([this.graphHeight - this.graphHeightOffset, 0]);
- axisXScale.domain(d3.extent(this.timeSeries[0].values, d => d.time));
- axisYScale.domain([0, d3.max(this.timeSeries[0].values.map(d => d.value))]);
+ const allValues = this.timeSeries.reduce((all, { values }) => all.concat(values), []);
+ axisXScale.domain(d3.extent(allValues, d => d.time));
+ axisYScale.domain([0, d3.max(allValues.map(d => d.value))]);
const xAxis = d3.svg.axis()
.scale(axisXScale)