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

[Lens] Add new error case for mixed x axes #102861

Merged
merged 4 commits into from
Jun 24, 2021

Conversation

flash1293
Copy link
Contributor

Fixes #97427

Treat mixed interval/ordinal axes as an error because the x axis can't be rendered in a meaningful way in these situations.

@flash1293 flash1293 added release_note:fix Team:Visualizations Visualization editors, elastic-charts and infrastructure v8.0.0 Feature:Lens v7.14.0 auto-backport Deprecated - use backport:version if exact versions are needed labels Jun 22, 2021
@flash1293 flash1293 changed the title add new error cases for mixed x axes [Lens] Add new error case for mixed x axes Jun 22, 2021
@flash1293 flash1293 marked this pull request as ready for review June 22, 2021 11:28
@flash1293 flash1293 requested a review from a team June 22, 2021 11:28
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

@dej611
Copy link
Contributor

dej611 commented Jun 23, 2021

Not a major problem, but with this PR is still possible to mix date histogram with single metric, which is still some kind of mix:

Screenshot 2021-06-23 at 11 49 41

@flash1293
Copy link
Contributor Author

@dej611 True, but it doesn't seem to break any formatting and looks like something that could easily happen while configuring a chart, so IMHO it's fine. We allow other kind of mixed charts as well (e.g. top values + filters) because they work together.

Copy link
Contributor

@wylieconlon wylieconlon left a comment

Choose a reason for hiding this comment

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

LGTM

},
}),
longMessage: i18n.translate('xpack.lens.xyVisualization.dataTypeFailureXOrdinalLong', {
defaultMessage: `Data type mismatch for the {axis}. Cannot mix interval and ordinal scale types.`,
Copy link
Contributor

Choose a reason for hiding this comment

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

The terms interval and ordinal are a little confusing, maybe it's enough to say Data type mismatch for the {axis}, use a different function?

@flash1293
Copy link
Contributor Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

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

id before after diff
lens 1.5MB 1.5MB +719.0B

History

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

@flash1293 flash1293 merged commit b1b182b into elastic:master Jun 24, 2021
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jun 24, 2021
@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
7.x

This backport PR will be merged automatically after passing CI.

kibanamachine added a commit that referenced this pull request Jun 24, 2021
Co-authored-by: Joe Reuter <johannes.reuter@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed Feature:Lens release_note:fix Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.14.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Lens] Mixing date histogram and ordinal values on x axis loses date formatting
5 participants