[XY] xyVis and layeredXyVis.#128255
Conversation
…to chart_expressions-xy
# Conflicts: # src/plugins/chart_expressions/expression_xy/common/expression_functions/legend_config.ts # x-pack/plugins/lens/public/xy_visualization/visualization.tsx
…to chart_expressions-xy
flash1293
left a comment
There was a problem hiding this comment.
Tested around a bit more and couldn't find anything that doesn't work. LGTM!
| } | ||
|
|
||
| // use an alias if _ is the missing arg | ||
| const errorArg = name === '_' ? aliases[0] : name; |
There was a problem hiding this comment.
this line has a potential to throw (when aliases is not an array).
const errorArg = name === '_' && aliases?.length ? aliases[0] : name;
There was a problem hiding this comment.
I've checked it. name can't have the name _. It should be in aliases. So, in any case, you'll have the first element. Am I wrong?
There was a problem hiding this comment.
There was a problem hiding this comment.
in that case we should get rid of errorArg and just use name
There was a problem hiding this comment.
Checked everything. Works as expected. That check was not used.
|
@elasticmachine merge upstream |
|
@elasticmachine merge upstream |
|
@elasticmachine merge upstream |
|
merge conflict between base and head |
…pressions-xy-extended_layers # Conflicts: # src/plugins/chart_expressions/expression_xy/common/expression_functions/annotation_layer.ts # src/plugins/chart_expressions/expression_xy/public/components/annotations.tsx # src/plugins/chart_expressions/expression_xy/public/components/xy_chart.test.tsx # src/plugins/chart_expressions/expression_xy/public/components/xy_chart.tsx # src/plugins/event_annotation/common/index.ts # src/plugins/event_annotation/common/manual_event_annotation/index.ts # src/plugins/event_annotation/common/types.ts # x-pack/plugins/lens/public/xy_visualization/xy_config_panel/annotations_config_panel/index.tsx # x-pack/plugins/lens/public/xy_visualization/xy_config_panel/color_picker.tsx # x-pack/plugins/lens/public/xy_visualization/xy_config_panel/reference_line_config_panel/reference_line_panel.tsx # x-pack/plugins/lens/public/xy_visualization/xy_config_panel/shared/icon_select.tsx # x-pack/plugins/lens/public/xy_visualization/xy_config_panel/shared/marker_decoration_settings.tsx
# Conflicts: # src/plugins/chart_expressions/expression_xy/public/components/xy_chart.tsx
💚 Build SucceededMetrics [docs]Module Count
Public APIs missing comments
Async chunks
Public APIs missing exports
Page load bundle
Unknown metric groupsAPI count
async chunk count
History
To update your PR or re-run it, just comment with: cc @Kunzetsov |
* 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 <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Marta Bondyra <marta.bondyra@gmail.com> Co-authored-by: Marta Bondyra <marta.bondyra@elastic.co>
|
I apologize for adding this comment now, but I'm trying to understand something. With this change, the ability to scale axes to data bounds was removed for bar charts. Could anyone explain why that was done? My company has several visualizations that became unusable because of that behavior change. |
Completes #128056 and part of #127115
Changes made:
layeredXyVisandxyVisexpressions are splitted.titleanddescriptionarguments are removed fromlayeredXyVisandxyVis.DataLayerscomponent is added and code has been simplified.xyVishas changed to be used atCanvas.strict,defaultandrequiredhas been added to the arguments to make the expression use-friendly.yConfigandextendedYConfigare splitted.yConfigis used for configuration ofdataLayerandextendedDataLayer, it contains only options, which are appliable to the dataLayer.extendedYConfigcontains all the configuration, which is appliable to thereferenceLineLayer.iconargument fromreferenceLineLayershould contain limited amount of available variants for user to be easy to use this expression.legendSizedisabling at Lens, iflegendPositionisinside.extent.mode, when it is turned todataBoundsand there are nolinechart series.Will be done in the separate PRs
referenceLineLayershould contain the additional argument for the static value. Otherwise, it is impossible forCanvas'users to use thereferenceLineLayerexpression via accessors, if they want some static value.annotationLayersshould become usable from Canvas. Now the annotation is not appearing in the chart if used with the other datasource expression function from the one, used in Lens.Testing notes
layeredXyVisshould be tested viaLens. As we've got rid of layerIds at thelayeredXyVis, it was required to add some logic of remapping back dataLayer indexes to the layerIds of Lens, as this part of Kibana is tightly coupled with layerIds logic. So, should be checked if all the places, whereactiveDatais used, it was remapped with theVisualization.convertActiveData.seriestypes.Lensmust work as before, withouterrorsfrom theexpressionsside. As we've got rid ofxyVisshould be tested fromCanvaswith different variations of arguments (starting from zero arguments. The main goal of this PR was to make this expression usable forCanvas'users. It has to guide users on how to use it.).referenceLineLayersandannotationLayersare not usable fromCanvasyet.Example of the expression for the testing in
Canvas