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