Commit 4ee9f1dd authored by Brandon Labuschagne's avatar Brandon Labuschagne

Merge branch '351910-refactor-milestone-burnup-chart-responsiveness' into 'master'

Refactor milestone burnup chart responsiveness

See merge request gitlab-org/gitlab!81194
parents 1812f605 0c1614de
<script>
import { GlResizeObserverDirective as GlResizeObserver } from '@gitlab/ui';
import { GlLineChart } from '@gitlab/ui/dist/charts';
import dateFormat from 'dateformat';
import { merge } from 'lodash';
......@@ -7,9 +6,6 @@ import { __, n__, sprintf } from '~/locale';
import commonChartOptions from './common_chart_options';
export default {
directives: {
GlResizeObserver,
},
components: {
GlLineChart,
},
......@@ -90,9 +86,6 @@ export default {
setChart(chart) {
this.chart = chart;
},
onResize() {
this.chart?.resize();
},
// transform the object to a chart-friendly array of date + value
transform(key) {
return this.burnupData.map((val) => [val.date, val[key]]);
......@@ -130,7 +123,7 @@ export default {
</div>
<gl-line-chart
v-if="!loading"
v-gl-resize-observer="onResize"
:responsive="true"
class="js-burnup-chart"
:data="dataSeries"
:option="options"
......
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