Skip to content

Commit

Permalink
chore(viz): rename v1 and v2 charts
Browse files Browse the repository at this point in the history
  • Loading branch information
villebro committed Dec 8, 2022
1 parent 3a442e0 commit e572fd9
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const metadata = new ChartMetadata({
t(`Used to summarize a set of data by grouping together multiple statistics along two axes. Examples: Sales numbers by region and month, tasks by status and assignee, active users by age and location.
This chart is being deprecated and we recommend checking out Pivot Table V2 instead!`),
name: t('Pivot Table'),
name: t('Pivot Table (legacy)'),
tags: [t('Legacy')],
thumbnail,
useLegacyApi: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const metadata = new ChartMetadata({
{ url: example3 },
{ url: example4 },
],
name: t('Treemap'),
name: t('Treemap (legacy)'),
tags: [
t('Categorical'),
t('Legacy'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const metadata = new ChartMetadata({
{ url: example3, caption: t('Video game consoles') },
{ url: example4, caption: t('Vehicle Types') },
],
name: t('Area Chart'),
name: t('Area Chart (legacy)'),
supportedAnnotationTypes: [ANNOTATION_TYPES.INTERVAL, ANNOTATION_TYPES.EVENT],
tags: [
t('Aesthetic'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const metadata = new ChartMetadata({
'Visualize how a metric changes over time using bars. Add a group by column to visualize group level metrics and how they change over time.',
),
exampleGallery: [{ url: example1 }, { url: example2 }, { url: example3 }],
name: t('Time-series Bar Chart'),
name: t('Time-series Bar Chart (legacy)'),
supportedAnnotationTypes: [ANNOTATION_TYPES.INTERVAL, ANNOTATION_TYPES.EVENT],
tags: [
t('Bar'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const metadata = new ChartMetadata({
{ url: example2 },
{ url: battery, caption: t('Battery level over time') },
],
name: t('Line Chart'),
name: t('Line Chart (legacy)'),
supportedAnnotationTypes: [
ANNOTATION_TYPES.TIME_SERIES,
ANNOTATION_TYPES.INTERVAL,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export default class EchartsAreaChartPlugin extends ChartPlugin<
AnnotationType.Timeseries,
],
name: hasGenericChartAxes
? t('Area Chart v2')
? t('Area Chart')
: t('Time-series Area Chart'),
tags: [
t('ECharts'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,7 @@ export default class EchartsTimeseriesBarChartPlugin extends ChartPlugin<
AnnotationType.Interval,
AnnotationType.Timeseries,
],
name: hasGenericChartAxes
? t('Bar Chart v2')
: t('Time-series Bar Chart v2'),
name: hasGenericChartAxes ? t('Bar Chart') : t('Time-series Bar Chart'),
tags: [
t('ECharts'),
t('Predictive'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export default class EchartsTimeseriesLineChartPlugin extends ChartPlugin<
AnnotationType.Timeseries,
],
name: hasGenericChartAxes
? t('Line Chart v2')
? t('Line Chart')
: t('Time-series Line Chart'),
tags: [
t('ECharts'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export default class EchartsTreemapChartPlugin extends ChartPlugin<
'Show hierarchical relationships of data, with with the value represented by area, showing proportion and contribution to the whole.',
),
exampleGallery: [{ url: example1 }, { url: example2 }],
name: t('Treemap v2'),
name: t('Treemap'),
tags: [
t('Aesthetic'),
t('Categorical'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export default class PivotTableChartPlugin extends ChartPlugin<
description: t(
'Used to summarize a set of data by grouping together multiple statistics along two axes. Examples: Sales numbers by region and month, tasks by status and assignee, active users by age and location. Not the most visually stunning visualization, but highly informative and versatile.',
),
name: t('Pivot Table v2'),
name: t('Pivot Table'),
tags: [t('Additive'), t('Report'), t('Tabular'), t('Popular')],
thumbnail,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ describe('VizTypeControl', () => {
).toBeInTheDocument();
expect(
within(screen.getByTestId('fast-viz-switcher')).getByText(
'Time-series Bar Chart v2',
'Time-series Bar Chart',
),
).toBeInTheDocument();
expect(
Expand Down Expand Up @@ -251,7 +251,7 @@ describe('VizTypeControl', () => {
within(visualizations).getByText('Time-series Line Chart'),
).toBeVisible();
expect(
within(visualizations).getByText('Time-series Bar Chart v2'),
within(visualizations).getByText('Time-series Bar Chart'),
).toBeVisible();
expect(
within(visualizations).queryByText('Line Chart'),
Expand All @@ -269,9 +269,7 @@ describe('VizTypeControl', () => {
renderWrapper();
userEvent.click(screen.getByRole('button', { name: 'ballot All charts' }));
const visualizations = screen.getByTestId(getTestId('viz-row'));
userEvent.click(
within(visualizations).getByText('Time-series Bar Chart v2'),
);
userEvent.click(within(visualizations).getByText('Time-series Bar Chart'));

expect(defaultProps.onChange).not.toBeCalled();
userEvent.dblClick(
Expand Down

0 comments on commit e572fd9

Please sign in to comment.