-
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
[Lens] fit line charts by default #196184
[Lens] fit line charts by default #196184
Conversation
? 'always' | ||
: 'never', | ||
radius: pointsRadius !== undefined ? pointsRadius : xAccessor && !emphasizeFitting ? 5 : 0, | ||
visible: showPoints || markSizeAccessor ? 'always' : 'never', |
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.
simplifying this, points should be visible if showPoints is true or markSizeAccessor exist. we don't need a check on the xAccessor
: 'never', | ||
radius: pointsRadius !== undefined ? pointsRadius : xAccessor && !emphasizeFitting ? 5 : 0, | ||
visible: showPoints || markSizeAccessor ? 'always' : 'never', | ||
radius: pointsRadius, |
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.
same here on the point radius: if configured use the configured one, if not use the default from the theme. No need to check the fitting function or the emphasizeFitting property. This is already nicely handled by the library
💚 Build Succeeded
Metrics [docs]Public APIs missing comments
Async chunks
Page load bundle
History
|
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.
Code LGTM, tested on Chrome! When you can could you please review before and after pics I added to the PR description? I am sure there can be better examples, but I added them for documentation purposes.
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.
changes in packages/kbn-lens-embeddable-utils LGTM
Starting backport for target branches: 8.x |
## Summary Every line charts are now interpolated by default with a linear interpolation. Solves the second task of [elastic#186076](elastic#186076) fix [elastic#186076](elastic#186076) before: <img width="816" alt="Screenshot 2024-10-17 at 16 25 47" src="https://github.com/user-attachments/assets/3b14c80b-deef-4d8d-9d5b-e118619e31cb"> after: <img width="814" alt="Screenshot 2024-10-17 at 16 25 56" src="https://github.com/user-attachments/assets/45788530-aeb6-4851-ac1e-c53efcd73068"> ## Release note Newly and default configured Lens line charts are now interpolated by default with a straight Linear interpolation. --------- Co-authored-by: kibanamachine <[email protected]> Co-authored-by: Marta Bondyra <[email protected]> (cherry picked from commit 5fe8aad)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
# Backport This will backport the following commits from `main` to `8.x`: - [[Lens] fit line charts by default (#196184)](#196184) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Marco Vettorello","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-21T13:05:02Z","message":"[Lens] fit line charts by default (#196184)\n\n## Summary\r\n\r\nEvery line charts are now interpolated by default with a linear\r\ninterpolation.\r\n\r\nSolves the second task of\r\n[#186076](https://github.com/elastic/kibana/issues/186076)\r\n\r\nfix [#186076](https://github.com/elastic/kibana/issues/186076)\r\n\r\nbefore:\r\n<img width=\"816\" alt=\"Screenshot 2024-10-17 at 16 25 47\"\r\nsrc=\"https://github.com/user-attachments/assets/3b14c80b-deef-4d8d-9d5b-e118619e31cb\">\r\n\r\n\r\nafter:\r\n<img width=\"814\" alt=\"Screenshot 2024-10-17 at 16 25 56\"\r\nsrc=\"https://github.com/user-attachments/assets/45788530-aeb6-4851-ac1e-c53efcd73068\">\r\n\r\n## Release note\r\nNewly and default configured Lens line charts are now interpolated by\r\ndefault with a straight Linear interpolation.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>\r\nCo-authored-by: Marta Bondyra <[email protected]>","sha":"5fe8aad89d59726060ba860d2f0692ddb3ca5ffa","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:enhancement","enhancement","Feature:Lens","v9.0.0","apm:review","backport:version","v8.17.0"],"title":"[Lens] fit line charts by default","number":196184,"url":"https://github.com/elastic/kibana/pull/196184","mergeCommit":{"message":"[Lens] fit line charts by default (#196184)\n\n## Summary\r\n\r\nEvery line charts are now interpolated by default with a linear\r\ninterpolation.\r\n\r\nSolves the second task of\r\n[#186076](https://github.com/elastic/kibana/issues/186076)\r\n\r\nfix [#186076](https://github.com/elastic/kibana/issues/186076)\r\n\r\nbefore:\r\n<img width=\"816\" alt=\"Screenshot 2024-10-17 at 16 25 47\"\r\nsrc=\"https://github.com/user-attachments/assets/3b14c80b-deef-4d8d-9d5b-e118619e31cb\">\r\n\r\n\r\nafter:\r\n<img width=\"814\" alt=\"Screenshot 2024-10-17 at 16 25 56\"\r\nsrc=\"https://github.com/user-attachments/assets/45788530-aeb6-4851-ac1e-c53efcd73068\">\r\n\r\n## Release note\r\nNewly and default configured Lens line charts are now interpolated by\r\ndefault with a straight Linear interpolation.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>\r\nCo-authored-by: Marta Bondyra <[email protected]>","sha":"5fe8aad89d59726060ba860d2f0692ddb3ca5ffa"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/196184","number":196184,"mergeCommit":{"message":"[Lens] fit line charts by default (#196184)\n\n## Summary\r\n\r\nEvery line charts are now interpolated by default with a linear\r\ninterpolation.\r\n\r\nSolves the second task of\r\n[#186076](https://github.com/elastic/kibana/issues/186076)\r\n\r\nfix [#186076](https://github.com/elastic/kibana/issues/186076)\r\n\r\nbefore:\r\n<img width=\"816\" alt=\"Screenshot 2024-10-17 at 16 25 47\"\r\nsrc=\"https://github.com/user-attachments/assets/3b14c80b-deef-4d8d-9d5b-e118619e31cb\">\r\n\r\n\r\nafter:\r\n<img width=\"814\" alt=\"Screenshot 2024-10-17 at 16 25 56\"\r\nsrc=\"https://github.com/user-attachments/assets/45788530-aeb6-4851-ac1e-c53efcd73068\">\r\n\r\n## Release note\r\nNewly and default configured Lens line charts are now interpolated by\r\ndefault with a straight Linear interpolation.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>\r\nCo-authored-by: Marta Bondyra <[email protected]>","sha":"5fe8aad89d59726060ba860d2f0692ddb3ca5ffa"}},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Marco Vettorello <[email protected]>
Summary
Every line charts are now interpolated by default with a linear interpolation.
Solves the second task of #186076
fix #186076
before:
after:
Release note
Newly and default configured Lens line charts are now interpolated by default with a straight Linear interpolation.