feat(xy)!: change timeAxisLayerCount the default from 0 to 2#2582
feat(xy)!: change timeAxisLayerCount the default from 0 to 2#2582walterra merged 39 commits intoelastic:mainfrom
timeAxisLayerCount the default from 0 to 2#2582Conversation
timeAxisLayerCount: 2 the defaulttimeAxisLayerCount: 2 the default
|
@walterra FYI, to update any playwright snapshots you can comment on the PR with.. This will run the ci in update mode and push a commit to your branch with the updated e2e screenshots, if any. The reason we need to run this in the CI is due to slight differences in the browser binaries between MacOS and linux ci agents. So to avoid this we only store screenshots generated from ci. And to just trigger a re-run of the ci you can comment... |
6b22f3a to
fd7ac96
Compare
timeAxisLayerCount: 2 the defaulttimeAxisLayerCount the default from 0 to 2
timeAxisLayerCount the default from 0 to 2timeAxisLayerCount the default from 0 to 2
timeAxisLayerCount the default from 0 to 2timeAxisLayerCount the default from 0 to 2
3a7832f to
abddedc
Compare
packages/charts/src/chart_types/xy_chart/state/selectors/get_axis_styles.ts
Show resolved
Hide resolved
2f97696 to
125b36b
Compare
packages/charts/src/chart_types/xy_chart/renderer/canvas/axes/tick.ts
Outdated
Show resolved
Hide resolved
packages/charts/src/chart_types/xy_chart/renderer/canvas/axes/tick_label.ts
Outdated
Show resolved
Hide resolved
packages/charts/src/chart_types/xy_chart/renderer/canvas/panels/title.ts
Outdated
Show resolved
Hide resolved
125b36b to
fc7edea
Compare
|
@markov00 I updated code related to |
c3b3570 to
c6fdc74
Compare
|
buildkite update screenshots |
nickofthyme
left a comment
There was a problem hiding this comment.
Overall LGTM. I would just ask that we swap out the manual object creation with the equivalent mocks in the unit tests.
packages/charts/src/chart_types/xy_chart/utils/axis_utils.test.ts
Outdated
Show resolved
Hide resolved
packages/charts/src/chart_types/xy_chart/utils/dimensions.test.ts
Outdated
Show resolved
Hide resolved
packages/charts/src/chart_types/xy_chart/state/selectors/visible_ticks.ts
Outdated
Show resolved
Hide resolved
nickofthyme
left a comment
There was a problem hiding this comment.
Thanks for the changes! LGTM
BREAKING CHANGE: The timeAxisLayerCount options now defaults to 2 instead of 0. The multilayer time axis is now the default style.
# [70.0.0](v69.2.0...v70.0.0) (2025-03-26) ### Features * **xy:** change timeAxisLayerCount the default from 0 to 2 ([#2582](#2582)) ([81c32c7](81c32c7)) ### BREAKING CHANGES * **xy:** The timeAxisLayerCount options now defaults to 2 instead of 0. The multilayer time axis is now the default style.
## [69.2.1](v69.2.0...v69.2.1) (2025-03-28) ### Reverts * "feat(xy)!: change `timeAxisLayerCount` the default from `0` to `2` ([#2582](#2582))" ([a9d3fcb](a9d3fcb))
Summary
timeAxisLayerCount: 2is now the default to render multiple layers for time based axes. This feature was originally added in 2021 and now just a small set of consumers are using the legacy time axis.BREAKING CHANGE
The
timeAxisLayerCountoptions now defaults to2instead of0.Details
timeAxisLayerCountdefaulted to0, code in some places assumed that a change to2was only done by users when the x axis was then time based. Thus changing the default to2changed the calculated padding for all axis types.timeAxisLayerCountis set to2, there was no check for axes if they were actually time based. This means this also affected vertical axes so the left and right margin would change. I think that's the reason why we see so many baseline changes in the playwright e2e image assertions.Issues
Fixes #2125
This PR is part of elastic/kibana#193683
close elastic/kibana#221512
Checklist
:xy,:partition):interactions,:axis)closes #123,fixes #123)packages/charts/src/index.tslightanddarkthemes