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.
* Added extended layers expressions. * Added support of tables at layers. * Added annotations to layeredXyVIs. * Refactored the implementation to be reusable. * Fixed undefined layers. * Fixed empty arrays problems. * Fixed input translations and removed not used arguments. * Fixed missing required args error, and added required to arguments. * Simplified expression configuration. * Added strict to all the expressions. * Moved dataLayer to the separate component. * Refactored dataLayers helpers and xy_chart. * fillOpacity usage validation is added. * Fixed valueLabels argument options. Removed not used. Added validation for usage. * Added validation to the layeredXyVis. * Fixed extent validation. Co-authored-by: Kibana Machine <[email protected]> Co-authored-by: Marta Bondyra <[email protected]> Co-authored-by: Marta Bondyra <[email protected]>
- Loading branch information
Showing
118 changed files
with
7,374 additions
and
3,780 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
72 changes: 72 additions & 0 deletions
72
...ins/chart_expressions/expression_xy/common/expression_functions/common_data_layer_args.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,72 @@ | ||
/* | ||
* 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 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
import { SeriesTypes, XScaleTypes, YScaleTypes, Y_CONFIG } from '../constants'; | ||
import { strings } from '../i18n'; | ||
import { DataLayerFn, ExtendedDataLayerFn } from '../types'; | ||
|
||
type CommonDataLayerFn = DataLayerFn | ExtendedDataLayerFn; | ||
|
||
export const commonDataLayerArgs: CommonDataLayerFn['args'] = { | ||
hide: { | ||
types: ['boolean'], | ||
default: false, | ||
help: strings.getHideHelp(), | ||
}, | ||
xAccessor: { | ||
types: ['string'], | ||
help: strings.getXAccessorHelp(), | ||
}, | ||
seriesType: { | ||
types: ['string'], | ||
options: [...Object.values(SeriesTypes)], | ||
help: strings.getSeriesTypeHelp(), | ||
required: true, | ||
strict: true, | ||
}, | ||
xScaleType: { | ||
options: [...Object.values(XScaleTypes)], | ||
help: strings.getXScaleTypeHelp(), | ||
default: XScaleTypes.ORDINAL, | ||
strict: true, | ||
}, | ||
isHistogram: { | ||
types: ['boolean'], | ||
default: false, | ||
help: strings.getIsHistogramHelp(), | ||
}, | ||
yScaleType: { | ||
options: [...Object.values(YScaleTypes)], | ||
help: strings.getYScaleTypeHelp(), | ||
default: YScaleTypes.LINEAR, | ||
strict: true, | ||
}, | ||
splitAccessor: { | ||
types: ['string'], | ||
help: strings.getSplitAccessorHelp(), | ||
}, | ||
accessors: { | ||
types: ['string'], | ||
help: strings.getAccessorsHelp(), | ||
multi: true, | ||
}, | ||
yConfig: { | ||
types: [Y_CONFIG], | ||
help: strings.getYConfigHelp(), | ||
multi: true, | ||
}, | ||
columnToLabel: { | ||
types: ['string'], | ||
help: strings.getColumnToLabelHelp(), | ||
}, | ||
palette: { | ||
types: ['palette', 'system_palette'], | ||
help: strings.getPaletteHelp(), | ||
default: '{palette}', | ||
}, | ||
}; |
30 changes: 30 additions & 0 deletions
30
...expressions/expression_xy/common/expression_functions/common_reference_line_layer_args.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,30 @@ | ||
/* | ||
* 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 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
import { EXTENDED_Y_CONFIG } from '../constants'; | ||
import { strings } from '../i18n'; | ||
import { ReferenceLineLayerFn, ExtendedReferenceLineLayerFn } from '../types'; | ||
|
||
type CommonReferenceLineLayerFn = ReferenceLineLayerFn | ExtendedReferenceLineLayerFn; | ||
|
||
export const commonReferenceLineLayerArgs: CommonReferenceLineLayerFn['args'] = { | ||
accessors: { | ||
types: ['string'], | ||
help: strings.getRLAccessorsHelp(), | ||
multi: true, | ||
}, | ||
yConfig: { | ||
types: [EXTENDED_Y_CONFIG], | ||
help: strings.getRLYConfigHelp(), | ||
multi: true, | ||
}, | ||
columnToLabel: { | ||
types: ['string'], | ||
help: strings.getColumnToLabelHelp(), | ||
}, | ||
}; |
Oops, something went wrong.