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
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/monitoring/components/charts/time_series.vue')
-rw-r--r--app/assets/javascripts/monitoring/components/charts/time_series.vue28
1 files changed, 17 insertions, 11 deletions
diff --git a/app/assets/javascripts/monitoring/components/charts/time_series.vue b/app/assets/javascripts/monitoring/components/charts/time_series.vue
index e6dbc38402e..d2b1e4da3fd 100644
--- a/app/assets/javascripts/monitoring/components/charts/time_series.vue
+++ b/app/assets/javascripts/monitoring/components/charts/time_series.vue
@@ -162,7 +162,8 @@ export default {
);
},
chartOptions() {
- const option = omit(this.option, 'series');
+ const { yAxis, xAxis } = this.option;
+ const option = omit(this.option, ['series', 'yAxis', 'xAxis']);
const dataYAxis = {
name: this.yAxisLabel,
@@ -173,7 +174,9 @@ export default {
axisLabel: {
formatter: num => roundOffFloat(num, 3).toString(),
},
+ ...yAxis,
};
+
const deploymentsYAxis = {
show: false,
min: deploymentYAxisCoords.min,
@@ -184,18 +187,21 @@ export default {
},
};
+ const timeXAxis = {
+ name: __('Time'),
+ type: 'time',
+ axisLabel: {
+ formatter: date => dateFormat(date, dateFormats.timeOfDay),
+ },
+ axisPointer: {
+ snap: true,
+ },
+ ...xAxis,
+ };
+
return {
series: this.chartOptionSeries,
- xAxis: {
- name: __('Time'),
- type: 'time',
- axisLabel: {
- formatter: date => dateFormat(date, dateFormats.timeOfDay),
- },
- axisPointer: {
- snap: true,
- },
- },
+ xAxis: timeXAxis,
yAxis: [dataYAxis, deploymentsYAxis],
dataZoom: [this.dataZoomConfig],
...option,