Commit 98496961 authored by GitLab Bot's avatar GitLab Bot

Automatic merge of gitlab-org/gitlab-ce master

parents 7dc11817 76c8d4fb
......@@ -125,17 +125,17 @@ export default {
},
earliestDatapoint() {
return this.chartData.reduce((acc, series) => {
if (!series.data.length) {
const { data } = series;
const { length } = data;
if (!length) {
return acc;
}
const [[timestamp]] = series.data.sort(([a], [b]) => {
if (a < b) {
return -1;
}
return a > b ? 1 : 0;
});
return timestamp < acc || acc === null ? timestamp : acc;
const [first] = data[0];
const [last] = data[length - 1];
const seriesEarliest = first < last ? first : last;
return seriesEarliest < acc || acc === null ? seriesEarliest : acc;
}, null);
},
isMultiSeries() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment