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] Quickfunction help #141399

Merged
merged 6 commits into from
Sep 29, 2022
Merged

Conversation

flash1293
Copy link
Contributor

Adds help popover for quickfunctions:
Screenshot 2022-09-22 at 14 14 28
Screenshot 2022-09-22 at 14 14 32
Screenshot 2022-09-22 at 14 14 37

For every function list, the popover shows the functions which are available as well.

Full list of descriptions:

Function Description
Average The Average of a field. This function only works for number fields.
Count Total number of documents. When you provide a field, the total number of field values is counted. Use the count function for fields that have multiple values in a single document.
Counter rate The change rate over time of an ever growing time series metric.
Cumulative sum The sum of all values as they grow over time.
Differences The change, or difference, between the values in subsequent intervals.
Last value The value of a field from the last document, ordered by the default time field of the data view.
Maximum The Maximum of a field. This function only works for number fields.
Median The Median of a field. This function only works for number fields.
Minimum The Minimum of a field. This function only works for number fields.
Moving average Smoothing values over time by averaging a moving window of averages.
Percentile The specified percentile of the values of a field. This is the value n percent of the values occuring in documents are smaller.
Percentile rank The percentage of values which are below a certain value. For example, if a value is greater than or equal to 95% of the observed values it is said to be at the 95th percentile rank.
Standard deviation The Standard deviation of a field. This function only works for number fields.
Sum The Sum of a field. This function only works for number fields.
Unique count The number of unique values of a specified field. Works for number, string, date and boolean values.
Date histogram Date or date range values distributed into intervals.
Filters Divides values into predefined subsets.
Intervals Buckets values along defined numeric ranges.
Top values The top values of a specified field ranked by the chosen metric.

@flash1293 flash1293 added release_note:enhancement Team:Visualizations Visualization editors, elastic-charts and infrastructure Feature:Lens backport:skip This commit does not require backporting labels Sep 22, 2022
@flash1293 flash1293 marked this pull request as ready for review September 22, 2022 13:25
@flash1293 flash1293 requested a review from a team as a code owner September 22, 2022 13:25
@elasticmachine
Copy link
Contributor

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

Copy link
Contributor

@dej611 dej611 left a comment

Choose a reason for hiding this comment

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

Tested locally in Safari.

The feature works. Do you think it makes sense add a tooltip to the icon as done in the Formula panel?

Screenshot 2022-09-22 at 17 51 12

Screenshot 2022-09-22 at 17 51 22

@flash1293
Copy link
Contributor Author

Good suggestion @mbondyra , I'm not sure about all the descriptions. Some of them are from the original spacetime PR, some of them I came up with on the spot because they were missing. @KOTungseth could you take a look too?

@KOTungseth
Copy link
Contributor

Thank you so much for opening this PR! Here are my recommended changes.

Function Description Recommended change
Average The Average of a field. This function only works for number fields. The average value of a number field.
Count Total number of documents. When you provide a field, the total number of field values is counted. Use the count function for fields that have multiple values in a single document. The total number of documents. When you provide a field, the total number of field values is counted. Use the count function for fields that have multiple values in a single document.
Counter rate The change rate over time of an ever growing time series metric. The rate of change over time for an ever growing time series metric.
Cumulative sum The sum of all values as they grow over time.
Differences The change, or difference, between the values in subsequent intervals.
Last value The value of a field from the last document, ordered by the default time field of the data view.
Maximum The Maximum of a field. This function only works for number fields. The maximum value of a number field.
Median The Median of a field. This function only works for number fields. The median value of a number field.
Minimum The Minimum of a field. This function only works for number fields. The minimum value of a number field.
Moving average Smoothing values over time by averaging a moving window of averages. The average of a moving window of average values over time.
Percentile The specified percentile of the values of a field. This is the value n percent of the values occuring in documents are smaller. The value n percent of the values that occur in smaller documents.
Percentile rank The percentage of values which are below a certain value. For example, if a value is greater than or equal to 95% of the observed values it is said to be at the 95th percentile rank. The percentage of values that are below a specific value. For example, when a value is greater than or equal to 95% of the calculated values, the value is the 95th percentile rank.
Standard deviation The Standard deviation of a field. This function only works for number fields. The amount of variation for a set of number fields.
Sum The Sum of a field. This function only works for number fields. The total amount of a set of number fields.
Unique count The number of unique values of a specified field. Works for number, string, date and boolean values. The number of unique values for a specified number, string, date, or boolean field.
Date histogram Date or date range values distributed into intervals. The date or date range values distributed into intervals.
Filters Divides values into predefined subsets.
Intervals Buckets values along defined numeric ranges.
Top values The top values of a specified field ranked by the chosen metric.

Copy link
Contributor

@mbondyra mbondyra left a comment

Choose a reason for hiding this comment

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

I'd still change The change, or difference, between the values in subsequent intervals. to The change between the values in subsequent intervals. but apart from it looks fine.

@mbondyra
Copy link
Contributor

@elasticmachine merge upstream

@kibana-ci
Copy link
Collaborator

💚 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.3MB 1.3MB +5.3KB

History

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

@flash1293 flash1293 merged commit 226efc0 into elastic:main Sep 29, 2022
@MichaelMarcialis
Copy link
Contributor

@flash1293: I'm a little late to the party on this one, but is there any chance we could switch the EuiButtonIcon placement so that it appears on the right side of the text? It feels a little weird currently to have it appear before the "Functions" label text.

@flash1293
Copy link
Contributor Author

No problem, opened a PR for this: #142623

@TinaHeiligers
Copy link
Contributor

for auditing purposes, I referenced this issue in a bug-fix by mistake.

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.6.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants