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/graph/axis.vue')
-rw-r--r--app/assets/javascripts/monitoring/components/graph/axis.vue12
1 files changed, 11 insertions, 1 deletions
diff --git a/app/assets/javascripts/monitoring/components/graph/axis.vue b/app/assets/javascripts/monitoring/components/graph/axis.vue
index ae397fc39e2..6e15f938ab7 100644
--- a/app/assets/javascripts/monitoring/components/graph/axis.vue
+++ b/app/assets/javascripts/monitoring/components/graph/axis.vue
@@ -1,4 +1,6 @@
<script>
+import { convertToSentenceCase } from '~/lib/utils/text_utility';
+
export default {
props: {
graphWidth: {
@@ -21,6 +23,10 @@ export default {
type: String,
required: true,
},
+ unitOfDisplay: {
+ type: String,
+ required: true,
+ },
},
data() {
return {
@@ -64,6 +70,10 @@ export default {
this.measurements.axisLabelLineOffset || 0
);
},
+
+ yAxisLabelSentenceCase() {
+ return `${convertToSentenceCase(this.yAxisLabel)} (${this.unitOfDisplay})`;
+ },
},
mounted() {
this.$nextTick(() => {
@@ -106,7 +116,7 @@ export default {
:transform="textTransform"
ref="ylabel"
>
- {{ yAxisLabel }}
+ {{ yAxisLabelSentenceCase }}
</text>
<rect
class="rect-axis-text"