Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[XY] Support vis_dimension type for accessors #129612

Merged

Conversation

VladLasitsa
Copy link
Contributor

@VladLasitsa VladLasitsa commented Apr 6, 2022

Completes part of #127115

Summary

  • Added full support of visdimension at fields: splitAccessor, accessors, xAccessor in xyVis
  • Added full support of visdimension at fields: accessors in referenceLineLayer.
  • Added validation of the string accessors at xyVis, extendedDataLayer, referenceLineLayer and extendedReferenceLineLayer expressions.

We cannot add support of visdimension for accessors in extendedDataLayer and extendedReferenceLineLayer because here we can provide input data as an argument but visdimension requires data as inputTypes so that validation works correctly.

Will be ready after merge of #131919.

@VladLasitsa
Copy link
Contributor Author

@elasticmachine merge upstream

@Kuznietsov Kuznietsov added the WIP Work in progress label May 11, 2022
@Kuznietsov Kuznietsov changed the title [XY] Support vis_dimension type for accessors [WIP][XY] Support vis_dimension type for accessors May 11, 2022
@VladLasitsa
Copy link
Contributor Author

@elasticmachine merge upstream

@VladLasitsa VladLasitsa changed the title [WIP][XY] Support vis_dimension type for accessors [XY] Support vis_dimension type for accessors May 13, 2022
@Kuznietsov
Copy link
Contributor

@elasticmachine merge upstream

Copy link
Contributor

@Kuznietsov Kuznietsov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Сode LGTM 👍

@flash1293
Copy link
Contributor

@elasticmachine merge upstream

Copy link
Contributor

@flash1293 flash1293 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, one thing that could be improved - if no y accessors are defined, this fails with a cryptic message:
Screenshot 2022-05-16 at 11 05 55

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
expressionXY 91 92 +1

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
visualizations 350 351 +1

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
expressionXY 56.4KB 60.5KB +4.1KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
expressionXY 29.1KB 28.9KB -272.0B
visualizations 46.5KB 46.5KB +10.0B
total -262.0B
Unknown metric groups

API count

id before after diff
visualizations 371 372 +1

async chunk count

id before after diff
expressionXY 5 6 +1

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @VladLasitsa

@VladLasitsa VladLasitsa merged commit dd2a9b5 into elastic:main May 16, 2022
Bamieh pushed a commit to Bamieh/kibana that referenced this pull request May 16, 2022
* added xy plugin.

* Added expressionXY limits.

* Added xy expression functions to the expression_xy plugin.

* Moved xy to a separate plugin.

* Small refactoring.

* Fixed types.

* Fixed import of scss.

* Fixed imports.

* Added required plugins.

* Fixed import

* Fixed types.

* Changed expression names.

* Fixed bugs, caused by the refactoring process.

* Fixed lens snapshots.

* Removed new line.

* Fixed xy_chart tests.

* Added lazy loading for xy chart.

* Fixed xy chart test.

* Fixed broken chart selectors.

* Fixed dashboard tests.

* dashboard test fixed.

* Fixed heatmap vis.

* Smokescreen test fixed.

* more fixes.

* async dashboard tests fixed.

* Fixed xy smokescreen tests selectors.

* fixed show_underlying_data tests.

* Updated snapshots.

* updated limits.

* Fixed more selectors

* Fixed persistent context test.

* Fixed some more test at ml.

* Fixed types and imports

* Fixed handlers.inspectorAdapters.tables.logDatatable

* Fixed logDatatable

* Translations fixed.

* Fixed "Visualize App ... cleans filters and query" test.

cleans filters and query

* Fixed "lens disable auto-apply tests" test.

* Updated dashboard tests.

* Fixed translations.

* Expression tests fixed.

* Cleaned up expression_xy.

* cleaned up lens xy_visualization.

* fixed more tests.

* Fix of tsvb.

* Fixed more tests.

* Fixed xy chart limits.

* Fixed new tests.

* Fixed types.

* Added extended layers expressions.

* Added support of tables at layers.

* Fixed tests.

* Fixed more tests.

* Fixed lens types.

* Added tables to layers.

* Checks fixed.

* updated tests.

* Fixed types.

* First try to fix merge conflicts.

* Fixed annotatations.

* Fixed types.

* Updated snapshots

* Fixed tests.

* Fixed dependencies.

* Fixed i18n.

* Moved XY state types to lens.

* Fixed more types.

* Update src/plugins/chart_expressions/expression_xy/README.md

Co-authored-by: Marta Bondyra <marta.bondyra@gmail.com>

* [CI] Auto-commit changed files from 'node scripts/build_plugin_list_docs'

* Removed yConfig from *Layers types

* Fixed styles.

* Fixed types.

* Removed not used utils and styles.

* Fixed types and tests.

* updated size.

* Added right behavior, related to the tables, comming from the expression.

* Fixed reference lines.

* Fixed jsdoc.

* Added annotations to layeredXyVIs.

* Fixed limits.

* 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.

* refactored code, according to the nit.

* Support visdimension type for accessors in data_layer and reference_line_layer

* Fix checks

* Moved dataLayer to the separate component.

* Fixed jest tests.

* Fixed tests.

* Some updates

* Refactored dataLayers helpers and xy_chart.

* More fixes of the expression

Added extendedYConfig for dataLayers.
Added yConfig for referenceLineLayers.
Fixed undefined id at tooltip.

* Fixed tests and snapshots.

* Icons at annotations and reference lines are strict.

* Fix CI

* axis extent validation added.

* Added checks to the legend config.

* fillOpacity usage validation is added.

* Fixed valueLabels argument options. Removed not used. Added validation for usage.

* Removed not used tests and imports.

* Fixed valueLabels and added migrations.

* Fixed type checks.

* Added test for the migrations.

* Fixed imports.

* Fixed types

* Fixed i18n checks.

# Conflicts:
#	src/plugins/chart_expressions/expression_xy/public/components/xy_chart.tsx

* Fixed imports and types.

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* Update src/plugins/chart_expressions/expression_xy/common/expression_functions/extended_annotation_layer.ts

Co-authored-by: Marta Bondyra <marta.bondyra@gmail.com>

* Removed extra extends.

* Update src/plugins/chart_expressions/expression_xy/common/expression_functions/annotation_layer.ts

Co-authored-by: Marta Bondyra <marta.bondyra@gmail.com>

* Added guard.

* Fixed the code duplication.

* Removed table from the annotation layer.

* Changed the `convertActiveDataFromIndexesToLayers` location.

* Added tests for convertActiveDataFromIndexesToLayers

* Reduced the bundle size a little bit.

* Reused strings and args.

* Refactored expression functions. Added asynchronous behavior.

* Fixed tests.

* Updated limits.

* Updated the limit.

* Fixed types.

* fixed types.

* Turned back layerIds.

* Removed convertActiveData from Lens.

* Added test to the layerIds generator.

* Fixed types.

* Fixed problems with resetting of the inspector.

* Fixed migrations.

* Removed types.

* Removed tones of `areFormatted` calculations.

* Fixed `isTimeViz` and `isHistogramViz` by replacing filteredLayers with dataLayers.

* Removed referenceLineLayers from the `groupAxesByType` fn.

* Added validation to the layeredXyVis.

* Fixed extent validation.

* Removed comments.

* Reduced limit.

* Added optimizations.

* Fixed floatingColumns error.

* Fixed types.

* Updated limits.

* Turned back extent validation.

* Fixed stacked error.

* Parallelized async import of functions.

* Decreased the complexity of the algorithm.

* Fixed snapshot.

* Some fixes

* Fix checks

* Fixed types

* Fix types

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* Added validation to the accessors.

* Validated accessors at the referenceLineLayer and extendedReferenceLineLayer.

* Fixed some style issues.

* Fixed imports.

* One more fix of import.

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* Move extended data layer fn in async file

* Some improvements

* Fix checks

* Fix validation

Co-authored-by: Yaroslav Kuznietsov <kuznetsov.yaroslav.yk@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Marta Bondyra <marta.bondyra@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:XYAxis XY-Axis charts (bar, area, line) release_note:skip Skip the PR/issue when compiling release notes Team:Visualizations Visualization editors, elastic-charts and infrastructure v8.3.0 WIP Work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants