Commit e67d5444 authored by Brandon Labuschagne's avatar Brandon Labuschagne

Merge branch...

Merge branch '295674-y-axis-of-duration-for-last-30-commits-has-unclear-unit-of-measure-m' into 'master'

Pipeline duration chart: Add yAxis formatter

See merge request gitlab-org/gitlab!70373
parents a910f710 a3f4b8e6
......@@ -199,6 +199,16 @@ export default {
},
];
},
chartOptions() {
return {
...this.$options.timesChartOptions,
yAxis: {
axisLabel: {
formatter: (value) => value,
},
},
};
},
},
methods: {
hideAlert() {
......@@ -314,7 +324,7 @@ export default {
<strong>{{ __('Pipeline durations for the last 30 commits') }}</strong>
<gl-column-chart
:height="$options.chartContainerHeight"
:option="$options.timesChartOptions"
:option="chartOptions"
:bars="timesChartTransformedData"
:y-axis-title="__('Minutes')"
:x-axis-title="__('Commit')"
......
......@@ -60,7 +60,7 @@ describe('~/projects/pipelines/charts/components/pipeline_charts.vue', () => {
expect(chart.props('yAxisTitle')).toBe('Minutes');
expect(chart.props('xAxisTitle')).toBe('Commit');
expect(chart.props('bars')).toBe(wrapper.vm.timesChartTransformedData);
expect(chart.props('option')).toBe(wrapper.vm.$options.timesChartOptions);
expect(chart.props('option')).toBe(wrapper.vm.chartOptions);
});
});
......
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