Commit a3f4b8e6 authored by wortschi's avatar wortschi

Add yAxis formatter

Changelog: fixed
parent 102c945c
......@@ -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