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 support for curved, linear and stepped lines #158896

Merged
merged 17 commits into from
Jun 8, 2023

Conversation

nickofthyme
Copy link
Contributor

@nickofthyme nickofthyme commented Jun 2, 2023

Summary

Adds support for straight, smooth (curved) and step (after) curves on line and area charts in Lens.

Screen Recording 2023-06-07 at 10 29 40 AM

closes #154410

Checklist

@nickofthyme
Copy link
Contributor Author

@markov00 Can you review the naming and descriptions? I don't think descriptions are absolutely necessary but would be nice to have.

@nickofthyme nickofthyme added release_note:skip Skip the PR/issue when compiling release notes v8.9.0 labels Jun 2, 2023
@nickofthyme nickofthyme marked this pull request as ready for review June 5, 2023 15:34
@nickofthyme nickofthyme requested a review from a team as a code owner June 5, 2023 15:34
Copy link
Member

@markov00 markov00 left a comment

Choose a reason for hiding this comment

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

I would also suggest renaming the Curve type label to something else.
I feel that Interpolation or Line interpolation or Interpolation mode looks more specific and precise (you can't say that you are using a straight curve, but you have or a straight line or a curved line, IMHO and in my broken English knowledge)
I know that interpolation is not a daily used word by everyone, but this is anyway a technical software for technical people, and the use of technical words shouldn't be banned

@nickofthyme nickofthyme requested a review from markov00 June 6, 2023 15:12
@stratoula stratoula added release_note:fix Team:Visualizations Visualization editors, elastic-charts and infrastructure and removed release_note:skip Skip the PR/issue when compiling release notes labels Jun 7, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-visualizations @elastic/kibana-visualizations-external (Team:Visualizations)

@stratoula
Copy link
Contributor

stratoula commented Jun 7, 2023

@nickofthyme this works great and LGTM from me if @markov00 is ok. Do you want to also add the transition from TSVB to this PR?

When the users select Steps yes

image

and go to Lens we would like the Lens chart to have this curve.

It must be as simple as adding curveType: 'CURVE_STEP_AFTER', here

https://github.com/elastic/kibana/blob/main/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/configurations/xy/configuration.ts#L21

when steps equals 1 in the TSVB series.

@nickofthyme nickofthyme closed this Jun 7, 2023
@nickofthyme nickofthyme reopened this Jun 7, 2023
Copy link
Contributor

@stratoula stratoula left a comment

Choose a reason for hiding this comment

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

This works great, I checked the transition from TSVB and also migrating 8.8 SOs. Everything LGTM! The FTs failing are also failing in main so I hope that they are going to skip it soon (I reported this to the team)

@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #3 / InfraOps App Metrics UI Metrics Explorer Saved Views should update the current saved view and load it

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
lens 885 886 +1

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
expressionXY 163 165 +2
visualizations 779 780 +1
total +3

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.2MB 1.2MB +901.0B
visTypeTimeseries 507.7KB 507.9KB +156.0B
total +1.0KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
expressionXY 38.1KB 38.1KB +47.0B
visualizations 56.5KB 56.6KB +95.0B
total +142.0B
Unknown metric groups

API count

id before after diff
expressionXY 173 175 +2
visualizations 809 810 +1
total +3

ESLint disabled line counts

id before after diff
enterpriseSearch 19 21 +2
securitySolution 414 418 +4
total +6

Total ESLint disabled count

id before after diff
enterpriseSearch 20 22 +2
securitySolution 498 502 +4
total +6

History

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

@nickofthyme nickofthyme changed the title Add support for curved, linear and stepped lines [Lens] Add support for curved, linear and stepped lines Jun 8, 2023
@nickofthyme nickofthyme merged commit afdf3f6 into elastic:main Jun 8, 2023
17 checks passed
@nickofthyme nickofthyme deleted the step-curves branch June 8, 2023 15:19
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Jun 8, 2023
saarikabhasi pushed a commit to saarikabhasi/kibana that referenced this pull request Jun 14, 2023
Adds support for `straight`, `smooth` (curved) and `step` (after) curves
on line and area charts in Lens.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:Lens release_note:enhancement Team:Visualizations Visualization editors, elastic-charts and infrastructure v8.9.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Lens] Add support for step in area/line charts
6 participants