Skip to content

Commit 4284739

Browse files
committed
correct copy for Lens
1 parent 5ff148c commit 4284739

2 files changed

Lines changed: 16 additions & 25 deletions

File tree

x-pack/plugins/lens/public/app_plugin/shared/edit_on_the_fly/lens_configuration_flyout.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77
import React from 'react';
88
import { renderWithReduxStore } from '../../../mocks';
9-
import { act, screen, waitFor } from '@testing-library/react';
9+
import { screen, waitFor } from '@testing-library/react';
1010
import userEvent from '@testing-library/user-event';
1111
import type { Query, AggregateQuery } from '@kbn/es-query';
1212
import { coreMock } from '@kbn/core/public/mocks';

x-pack/plugins/lens/public/visualizations/xy/types.ts

Lines changed: 15 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,18 @@ const areaShared = {
193193
}),
194194
};
195195

196+
const lineShared = {
197+
id: 'line',
198+
icon: IconChartLine,
199+
label: i18n.translate('xpack.lens.xyVisualization.lineLabel', {
200+
defaultMessage: 'Line',
201+
}),
202+
sortPriority: 2,
203+
description: i18n.translate('xpack.lens.line.visualizationDescription', {
204+
defaultMessage: 'Reveal variations in data over time.',
205+
}),
206+
};
207+
196208
export const visualizationSubtypes: VisualizationType[] = [
197209
{
198210
id: 'bar',
@@ -278,17 +290,7 @@ export const visualizationSubtypes: VisualizationType[] = [
278290
}),
279291
...areaShared,
280292
},
281-
{
282-
id: 'line',
283-
icon: IconChartLine,
284-
label: i18n.translate('xpack.lens.xyVisualization.lineLabel', {
285-
defaultMessage: 'Line',
286-
}),
287-
sortPriority: 2,
288-
description: i18n.translate('xpack.lens.line.visualizationDescription', {
289-
defaultMessage: 'Reveal variations in data over time.',
290-
}),
291-
},
293+
lineShared,
292294
];
293295

294296
export const visualizationTypes: VisualizationType[] = [
@@ -306,10 +308,7 @@ export const visualizationTypes: VisualizationType[] = [
306308
label: i18n.translate('xpack.lens.xyVisualization.barLabel', {
307309
defaultMessage: 'Bar',
308310
}),
309-
sortPriority: 1,
310-
description: i18n.translate('xpack.lens.bar.visualizationDescription', {
311-
defaultMessage: 'Compare categories or groups of data via bars.',
312-
}),
311+
...barShared,
313312
getCompatibleSubtype: (seriesType?: string) => {
314313
if (seriesType === 'area') {
315314
return 'bar';
@@ -342,15 +341,7 @@ export const visualizationTypes: VisualizationType[] = [
342341
},
343342
},
344343
{
345-
id: 'line',
346-
icon: IconChartLine,
347-
label: i18n.translate('xpack.lens.xyVisualization.lineLabel', {
348-
defaultMessage: 'Line',
349-
}),
350-
sortPriority: 2,
351-
description: i18n.translate('xpack.lens.line.visualizationDescription', {
352-
defaultMessage: 'Reveal variations in data over time or categorically.',
353-
}),
344+
...lineShared,
354345
subtypes: ['line'],
355346
},
356347
];

0 commit comments

Comments
 (0)