Skip to content

Commit

Permalink
correct copy for Lens
Browse files Browse the repository at this point in the history
  • Loading branch information
mbondyra committed Sep 17, 2024
1 parent 5ff148c commit 4284739
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/
import React from 'react';
import { renderWithReduxStore } from '../../../mocks';
import { act, screen, waitFor } from '@testing-library/react';
import { screen, waitFor } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import type { Query, AggregateQuery } from '@kbn/es-query';
import { coreMock } from '@kbn/core/public/mocks';
Expand Down
39 changes: 15 additions & 24 deletions x-pack/plugins/lens/public/visualizations/xy/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,18 @@ const areaShared = {
}),
};

const lineShared = {
id: 'line',
icon: IconChartLine,
label: i18n.translate('xpack.lens.xyVisualization.lineLabel', {
defaultMessage: 'Line',
}),
sortPriority: 2,
description: i18n.translate('xpack.lens.line.visualizationDescription', {
defaultMessage: 'Reveal variations in data over time.',
}),
};

export const visualizationSubtypes: VisualizationType[] = [
{
id: 'bar',
Expand Down Expand Up @@ -278,17 +290,7 @@ export const visualizationSubtypes: VisualizationType[] = [
}),
...areaShared,
},
{
id: 'line',
icon: IconChartLine,
label: i18n.translate('xpack.lens.xyVisualization.lineLabel', {
defaultMessage: 'Line',
}),
sortPriority: 2,
description: i18n.translate('xpack.lens.line.visualizationDescription', {
defaultMessage: 'Reveal variations in data over time.',
}),
},
lineShared,
];

export const visualizationTypes: VisualizationType[] = [
Expand All @@ -306,10 +308,7 @@ export const visualizationTypes: VisualizationType[] = [
label: i18n.translate('xpack.lens.xyVisualization.barLabel', {
defaultMessage: 'Bar',
}),
sortPriority: 1,
description: i18n.translate('xpack.lens.bar.visualizationDescription', {
defaultMessage: 'Compare categories or groups of data via bars.',
}),
...barShared,
getCompatibleSubtype: (seriesType?: string) => {
if (seriesType === 'area') {
return 'bar';
Expand Down Expand Up @@ -342,15 +341,7 @@ export const visualizationTypes: VisualizationType[] = [
},
},
{
id: 'line',
icon: IconChartLine,
label: i18n.translate('xpack.lens.xyVisualization.lineLabel', {
defaultMessage: 'Line',
}),
sortPriority: 2,
description: i18n.translate('xpack.lens.line.visualizationDescription', {
defaultMessage: 'Reveal variations in data over time or categorically.',
}),
...lineShared,
subtypes: ['line'],
},
];

0 comments on commit 4284739

Please sign in to comment.