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] Shortcut functions that can be "exploded" to customize more #74800

Closed
wylieconlon opened this issue Aug 11, 2020 · 4 comments
Closed

[Lens] Shortcut functions that can be "exploded" to customize more #74800

wylieconlon opened this issue Aug 11, 2020 · 4 comments
Labels
enhancement New value added to drive a business result Feature:Lens Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@wylieconlon
Copy link
Contributor

From a user perspective, Lens already offers more than one way to configure queries (drag and drop, forms, suggestions, etc). We can also provide shortcut functions:

Shortcut function: A function that is composed of 2 or more underlying functions

The main reason to offer shortcut functions is to provide speed and allow users to learn the more powerful features. For example, one of the building blocks that we have identified is the math function. We have also talked about building a ratio function using math, which would be implemented as a Math function with a numerator and denominator.

Potential shortcut functions:

Name How it's implemented
Filter ratio Math function built on top of two metrics. Both metrics share the same function like "Average", but use different filters. The formatter is % by default.
Simple ratio Math function built on top of two metrics, but filters are not required. The formatter is % by default.
Month over month This is a shortcut for changing the date histogram interval to Month and applying a 1 month time offset, displayed as a percent. These steps can all be done separately to create other metrics like "Today vs 1 month ago"
@wylieconlon wylieconlon added Team:Visualizations Visualization editors, elastic-charts and infrastructure Feature:Lens labels Aug 11, 2020
@elasticmachine
Copy link
Contributor

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

@wylieconlon
Copy link
Contributor Author

Here's a gif showing the process the way I'm imagining it for filter ratio. Users can use the simplified editor for filter ratio, and then to make more detailed edits you click a contextual menu:

Kapture 2020-08-11 at 18 38 45

The main limitation of filter ratio is that you are required to use the same field on both numerator and denominator. This is what the "Ratio" implementation would look like, which supports multiple metrics:

Kapture 2020-08-11 at 18 41 28

cc @flash1293 @cchaos @AlonaNadler

@wylieconlon
Copy link
Contributor Author

This issue still seems relevant, but we've changed the expected UX a bit. When you switch from a shortcut function to a formula, the formula will contain all of the sub-functions needed.

@flash1293
Copy link
Contributor

The general feature is provided by formula - additions for quick functions should be added individually (there is an issue for filter ratio already)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result Feature:Lens Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

No branches or pull requests

3 participants