forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Lens] Add support for curved, linear and stepped lines (elastic#158896)
Adds support for `straight`, `smooth` (curved) and `step` (after) curves on line and area charts in Lens.
- Loading branch information
1 parent
df9c194
commit 09e13fe
Showing
15 changed files
with
110 additions
and
61 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
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
46 changes: 46 additions & 0 deletions
46
...public/visualizations/xy/xy_config_panel/visual_options_popover/line_curve_definitions.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,46 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import type { XYCurveType } from '@kbn/expression-xy-plugin/common'; | ||
import { XYCurveTypes } from '@kbn/expression-xy-plugin/public'; | ||
import { i18n } from '@kbn/i18n'; | ||
|
||
export interface LineCurveDefinitions { | ||
type: Extract<XYCurveType, 'LINEAR' | 'CURVE_MONOTONE_X' | 'CURVE_STEP_AFTER'>; | ||
title: string; | ||
description?: string; | ||
} | ||
|
||
export const lineCurveDefinitions: LineCurveDefinitions[] = [ | ||
{ | ||
type: XYCurveTypes.LINEAR, | ||
title: i18n.translate('xpack.lens.lineCurve.straight', { | ||
defaultMessage: 'Straight', | ||
}), | ||
description: i18n.translate('xpack.lens.lineCurveDescription.straight', { | ||
defaultMessage: 'Straight line between points', | ||
}), | ||
}, | ||
{ | ||
type: XYCurveTypes.CURVE_MONOTONE_X, | ||
title: i18n.translate('xpack.lens.lineCurve.smooth', { | ||
defaultMessage: 'Smooth', | ||
}), | ||
description: i18n.translate('xpack.lens.lineCurveDescription.smooth', { | ||
defaultMessage: 'Smoothed line between points', | ||
}), | ||
}, | ||
{ | ||
type: XYCurveTypes.CURVE_STEP_AFTER, | ||
title: i18n.translate('xpack.lens.lineCurve.step', { | ||
defaultMessage: 'Step', | ||
}), | ||
description: i18n.translate('xpack.lens.lineCurveDescription.step', { | ||
defaultMessage: 'Stepped line between points', | ||
}), | ||
}, | ||
]; |
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
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
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