-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '7.x' into backport/7.x/pr-70031
- Loading branch information
Showing
20 changed files
with
388 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 0 additions & 66 deletions
66
packages/kbn-optimizer/src/integration_tests/__snapshots__/basic_optimization.test.ts.snap
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
x-pack/plugins/lens/public/xy_visualization/__snapshots__/to_expression.test.ts.snap
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
20 changes: 20 additions & 0 deletions
20
x-pack/plugins/lens/public/xy_visualization/__snapshots__/xy_expression.test.tsx.snap
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
69 changes: 69 additions & 0 deletions
69
x-pack/plugins/lens/public/xy_visualization/fitting_functions.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import { Fit } from '@elastic/charts'; | ||
import { i18n } from '@kbn/i18n'; | ||
|
||
export type FittingFunction = typeof fittingFunctionDefinitions[number]['id']; | ||
|
||
export const fittingFunctionDefinitions = [ | ||
{ | ||
id: 'None', | ||
title: i18n.translate('xpack.lens.fittingFunctionsTitle.none', { | ||
defaultMessage: 'Hide', | ||
}), | ||
description: i18n.translate('xpack.lens.fittingFunctionsDescription.none', { | ||
defaultMessage: 'Do not fill gaps', | ||
}), | ||
}, | ||
{ | ||
id: 'Zero', | ||
title: i18n.translate('xpack.lens.fittingFunctionsTitle.zero', { | ||
defaultMessage: 'Zero', | ||
}), | ||
description: i18n.translate('xpack.lens.fittingFunctionsDescription.zero', { | ||
defaultMessage: 'Fill gaps with zeros', | ||
}), | ||
}, | ||
{ | ||
id: 'Linear', | ||
title: i18n.translate('xpack.lens.fittingFunctionsTitle.linear', { | ||
defaultMessage: 'Linear', | ||
}), | ||
description: i18n.translate('xpack.lens.fittingFunctionsDescription.linear', { | ||
defaultMessage: 'Fill gaps with a line', | ||
}), | ||
}, | ||
{ | ||
id: 'Carry', | ||
title: i18n.translate('xpack.lens.fittingFunctionsTitle.carry', { | ||
defaultMessage: 'Last', | ||
}), | ||
description: i18n.translate('xpack.lens.fittingFunctionsDescription.carry', { | ||
defaultMessage: 'Fill gaps with the last value', | ||
}), | ||
}, | ||
{ | ||
id: 'Lookahead', | ||
title: i18n.translate('xpack.lens.fittingFunctionsTitle.lookahead', { | ||
defaultMessage: 'Next', | ||
}), | ||
description: i18n.translate('xpack.lens.fittingFunctionsDescription.lookahead', { | ||
defaultMessage: 'Fill gaps with the next value', | ||
}), | ||
}, | ||
] as const; | ||
|
||
export function getFitEnum(fittingFunction?: FittingFunction) { | ||
if (fittingFunction) { | ||
return Fit[fittingFunction]; | ||
} | ||
return Fit.None; | ||
} | ||
|
||
export function getFitOptions(fittingFunction?: FittingFunction) { | ||
return { type: getFitEnum(fittingFunction) }; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
x-pack/plugins/lens/public/xy_visualization/xy_config_panel.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.lnsXyToolbar__popover { | ||
width: 400px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.