Commit 5545f8c9 authored by Paul Slaughter's avatar Paul Slaughter

Merge branch 'remove-gl-resize-observer-from-devops-adoption' into 'master'

Refactor DA chart responsiveness

See merge request gitlab-org/gitlab!79853
parents 28ea4f63 52c532bb
<script>
import dateFormat from 'dateformat';
import { isFunction } from 'lodash';
import { GlResizeObserverDirective } from '@gitlab/ui';
import { GlStackedColumnChart } from '@gitlab/ui/dist/charts';
import { dateFormats } from '~/analytics/shared/constants';
import { formatNumber } from '~/locale';
......@@ -26,9 +24,6 @@ export default {
GlStackedColumnChart,
DevopsAdoptionTableCellFlag,
},
directives: {
GlResizeObserverDirective,
},
i18n: {
chartTitle: I18N_OVERVIEW_CHART_TITLE,
noFeaturesTracked: I18N_NO_FEATURE_META,
......@@ -110,11 +105,6 @@ export default {
return dateFormat(date.setDate(1), dateFormats.isoDate);
},
onResize() {
if (isFunction(this.chartInstance?.resize)) {
this.chartInstance.resize();
}
},
formatTooltipText(params) {
const { value, seriesData } = params;
const { dataIndex } = seriesData[0];
......@@ -148,7 +138,7 @@ export default {
<gl-stacked-column-chart
v-if="!$apollo.queries.devopsAdoptionEnabledNamespaces.loading"
v-gl-resize-observer-directive="onResize"
:responsive="true"
:bars="chartData"
:presentation="$options.presentation"
:option="chartOptions"
......
......@@ -12,6 +12,7 @@ exports[`DevopsAdoptionOverviewChart chart tooltip displays the tooltip informat
group-by="January"
option="[object Object]"
presentation="tiled"
responsive="true"
x-axis-title=""
x-axis-type="category"
y-axis-title="Total number of features adopted"
......
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