diff options
Diffstat (limited to 'app/assets/javascripts/monitoring/components/graph/axis.vue')
-rw-r--r-- | app/assets/javascripts/monitoring/components/graph/axis.vue | 12 |
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" |