Skip to content

Commit

Permalink
🔥 Remove some development cruft
Browse files Browse the repository at this point in the history
  • Loading branch information
dej611 committed Oct 8, 2020
1 parent 3eb6809 commit 49f7458
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 34 deletions.
32 changes: 0 additions & 32 deletions x-pack/plugins/lens/public/xy_visualization/xy_suggestions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -745,38 +745,6 @@ describe('xy_suggestions', () => {
});
});

// test('suggest to move histogram number as splitAccessor and extended date dimension as xAccessor', () => {
// (generateId as jest.Mock).mockReturnValueOnce('aaa');
// const [histoSuggestion] = getSuggestions({
// table: {
// isMultiRow: true,
// columns: [histogramCol('duration'), dateCol('date'), numCol('bytes')],
// layerId: 'first',
// changeType: 'extended',
// },
// state: {
// legend: { isVisible: true, position: 'bottom' },
// preferredSeriesType: 'bar',
// layers: [
// {
// accessors: ['bytes'],
// layerId: 'first',
// seriesType: 'bar',
// splitAccessor: undefined,
// xAccessor: 'duration',
// },
// ],
// },
// keptLayerIds: ['first'],
// });

// expect(histoSuggestion).toMatchObject({
// state: {
// layers: [{ xAccessor: 'date', splitAccessor: 'duration' }],
// },
// });
// });

test('changes column mappings when suggestion is reorder', () => {
const currentState: XYState = {
legend: { isVisible: true, position: 'bottom' },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,7 @@ function getBucketMappings(table: TableSuggestion, currentState?: State) {

if (
currentXScaleType &&
// make sure date histograms get mapped to x dimension even when changing current bucket/dimension mapping
// number histograms can be mapped also elsewhere
// make sure histograms get mapped to x dimension even when changing current bucket/dimension mapping
(currentXScaleType === 'interval' || prioritizedBuckets[0].operation.scale !== 'interval')
) {
const [x] = prioritizedBuckets.splice(currentXColumnIndex, 1);
Expand Down

0 comments on commit 49f7458

Please sign in to comment.