-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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] Add axes
support
#129476
[XY] Add axes
support
#129476
Conversation
# Conflicts: # src/plugins/chart_expressions/expression_xy/common/expression_functions/xy_chart.ts # src/plugins/chart_expressions/expression_xy/public/components/reference_lines.tsx # x-pack/plugins/lens/public/xy_visualization/expression.tsx # x-pack/plugins/lens/public/xy_visualization/reference_line_helpers.tsx # x-pack/plugins/lens/public/xy_visualization/state_helpers.ts # x-pack/plugins/lens/public/xy_visualization/to_expression.ts # x-pack/plugins/lens/public/xy_visualization/visualization.test.ts # x-pack/plugins/lens/public/xy_visualization/visualization.tsx # x-pack/plugins/lens/public/xy_visualization/visualization_helpers.tsx # x-pack/plugins/lens/public/xy_visualization/xy_config_panel/color_picker.tsx # x-pack/plugins/lens/public/xy_visualization/xy_config_panel/dimension_editor.tsx # x-pack/plugins/lens/public/xy_visualization/xy_config_panel/reference_line_panel.tsx # x-pack/plugins/lens/public/xy_visualization/xy_config_panel/shared/line_style_settings.tsx # x-pack/plugins/lens/public/xy_visualization/xy_config_panel/shared/marker_decoration_settings.tsx # x-pack/plugins/lens/public/xy_visualization/xy_config_panel/xy_config_panel.test.tsx
cleans filters and query
@dej611 Fixed issue, Could you please review again? |
…-ref HEAD~1..HEAD --fix'
# Conflicts: # x-pack/plugins/lens/public/xy_visualization/visualization.test.ts # x-pack/plugins/lens/public/xy_visualization/xy_config_panel/dimension_editor.tsx
@flash1293, I've fixed the problem. Could you, please, review the PR again? Thanks a lot. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Conflicts: # x-pack/plugins/lens/public/xy_visualization/visualization.tsx
💚 Build SucceededMetrics [docs]Module Count
Public APIs missing comments
Async chunks
Public APIs missing exports
Page load bundle
Unknown metric groupsAPI count
History
To update your PR or re-run it, just comment with: cc @VladLasitsa |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Tested locally
Tested and except for finding some issues reproducible on main (for example #135024), everything works fine! Approved 👌🏼 |
Closes: #129062
Summary
For better user experiance and understanding
yConfig
was renamed todecorations
. Now we have 2 expression functiondataDecorationConfig
referenceLineDecorationConfig
The unified XY renderer has to support two different styles of handling axis configurations. To achive this new args -
yAxisConfigs
andxAxisConfig
were added to expression functions. This arg allow to provide specific axis config and connect it todataDecorationConfig
from layer byaxisId
.As
axis
haveposition
arg where we can provide correct position for axis the 'axisMode' arg was removed fromdataDecorationConfig
.For reference line we can also provide
axisId
so that attach it ti needed axis or just provideposition
in that case reference line will be belong to first axis on defined postion.Note: To achive the
axisMode
='auto' behaviordataDecorationConfig
shouldn't haveaxisId
.Some additional changes:
id
)xAxisConfig
.xTitle
,yTitle
,yRightTitle
,yLeftExtent
,yRightExtent
,tickLabelsVisibilitySettings
,labelsOrientation
,gridlinesVisibilitySettings
,axisTitlesVisibilitySettings
args was removed as it can be provided as global axis configs by position or usingxAxisConfig
.seriesType
to different args -isPercentage
,isHorizontal
,isStacked
. From now seriesType can be only:bar
,area
orline
.truncate
arg)showOverlappingLabels
andshowDuplicates
arg)labelColor
arg)labelsOrientation
arg)boundsMargin
arg)position
arg)title
arg)showTitle
arg)showLabels
arg)extent
arg)scaleType
arg)mode
arg)isPercentage
) or in global axis config.Testing notes:
Global x-axis config:
Global y-axis config for defined position:
Specifed y-axis config for accessor:
Specifed axis for reference line by id:
Specifed axis for reference line by position: