-
Notifications
You must be signed in to change notification settings - Fork 121
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
feat(xy)!: change timeAxisLayerCount
the default from 0
to 2
#2582
base: main
Are you sure you want to change the base?
Conversation
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 2
timeAxisLayerCount
the default from 0
to 2
timeAxisLayerCount
the default from 0
to 2
timeAxisLayerCount
the default from 0
to 2
@@ -81,24 +81,7 @@ export const Example: ChartsStory = (_, { title, description }) => { | |||
}, |
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.
This reason for this regression: We now have to check for both timeAxisLayerCount > 0
and if the scale type is time
, however, the lowest chart uses ordinal
.
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.
@@ -132,7 +132,7 @@ Show duplicated ticks | |||
|
|||
### `timeAxisLayerCount` | |||
- Type: <code>timeAxisLayerCount: number</code> | |||
- Default: `0` | |||
- Default: `2` |
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.
Posting this here for reference to start a thread, because the affected example file has not been touched.
There's a baseline change for stories with custom markers. Previously the axis ticks and markers would render overlapping, now they render with additional offset. Is the new version ok? I'm not sure the original overlapping was intentional or a bug?
3a7832f
to
abddedc
Compare
✅ Successful Deployment (build#4404) - abddedc |
Summary
timeAxisLayerCount: 2
is 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
timeAxisLayerCount
options now defaults to2
instead of0
.Details
timeAxisLayerCount
defaulted to0
, code in some places assumed that a change to2
was only done by users when the x axis was then time based. Thus changing the default to2
changed the calculated padding for all axis types.timeAxisLayerCount
is 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
This PR is part of elastic/kibana#193683
Checklist
:xy
,:partition
):interactions
,:axis
)closes #123
,fixes #123
)packages/charts/src/index.ts
light
anddark
themes