Skip to content

[Lens] Add log and sqrt scale#131940

Merged
flash1293 merged 15 commits intoelastic:mainfrom
flash1293:lens-scale-axis
May 16, 2022
Merged

[Lens] Add log and sqrt scale#131940
flash1293 merged 15 commits intoelastic:mainfrom
flash1293:lens-scale-axis

Conversation

@flash1293
Copy link
Copy Markdown
Contributor

Fixes #98186

By adding a new axis scale setting to left and right axis:
Screenshot 2022-05-10 at 17 16 23

Technical details

There used to be a scaleType setting already on the data layer, but this isn't a good approach to configure as multiple layers will be mapped to the same axes so these settings would overwrite each other. This PR removes the layer y scale setting and moves it to the chart level similar to other "left" and "right" axis settings

@flash1293 flash1293 added release_note:enhancement Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// Feature:Lens backport:skip This PR does not require backporting v8.3.0 labels May 10, 2022
@flash1293 flash1293 marked this pull request as ready for review May 11, 2022 11:19
@flash1293 flash1293 requested a review from a team as a code owner May 11, 2022 11:19
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/kibana-vis-editors @elastic/kibana-vis-editors-external (Team:VisEditors)

Copy link
Copy Markdown
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.

Code LGTM, I tested all the XY charts and it works fine!

One question. I see that when I create a vertical stacked bar and change some axis settings (for example the orientation) and change to vertical bar for example, the settings are kept. But this doesn't happen for the scale, it initializes back to Linear. Is this on purpose?

@flash1293
Copy link
Copy Markdown
Contributor Author

flash1293 commented May 12, 2022

But this doesn't happen for the scale, it initializes back to Linear. Is this on purpose?

No, good catch, I'm going to fix that

@flash1293
Copy link
Copy Markdown
Contributor Author

@stratoula Adjusted - I was missing them in the suggestion logic.

@stratoula
Copy link
Copy Markdown
Contributor

Great Joe! Now they are transferred! It seems that our XY plugin is quite big. This is irrelevant with this PR but I see the failure here. Maybe something that the unified renderers team should improve?

@flash1293 flash1293 requested a review from a team as a code owner May 16, 2022 10:13
@flash1293 flash1293 enabled auto-merge (squash) May 16, 2022 15:24
@kibana-ci
Copy link
Copy Markdown

💚 Build Succeeded

Metrics [docs]

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 124 125 +1
lens 452 454 +2
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
expressionXY 60.5KB 60.6KB +62.0B
lens 1.1MB 1.1MB +936.0B
total +998.0B

Page load bundle

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

id before after diff
expressionXY 28.9KB 29.1KB +263.0B
Unknown metric groups

API count

id before after diff
expressionXY 134 135 +1
lens 527 529 +2
total +3

History

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

@flash1293 flash1293 merged commit b1473f8 into elastic:main May 16, 2022
@nickofthyme
Copy link
Copy Markdown
Contributor

@flash1293 Do we handle linear binary automatically or is there another reason that scale type wasn't added here too?

@flash1293
Copy link
Copy Markdown
Contributor Author

@nickofthyme yes, if the current datatable column has a byte formatter and the assigned axis uses linear, then it will switch to linear binary

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting Feature:Lens release_note:enhancement Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// v8.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Lens] Set axis scale

6 participants