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

[Maps] top term percentage field property #59386

Merged
merged 17 commits into from
Mar 6, 2020

Conversation

nreese
Copy link
Contributor

@nreese nreese commented Mar 4, 2020

Fixes #58129

This PR adds a top term percentage field property that is displayed in the tooltip and can be used for styling.

How it works is that when a user adds a Top term metric, 2 fields are created under the covers. One for the term and the other for the percentage.

Screen Shot 2020-03-04 at 3 58 18 PM

@nreese nreese added release_note:enhancement [Deprecated-Use Team:Presentation]Team:Geo Former Team Label for Geo Team. Now use Team:Presentation v8.0.0 v7.7.0 labels Mar 4, 2020
@nreese nreese requested review from jsanz and thomasneirynck March 4, 2020 23:00
@nreese nreese requested a review from a team as a code owner March 4, 2020 23:00
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-gis (Team:Geo)

@@ -118,30 +124,6 @@ export class ESTermSource extends AbstractESAggSource {
return false;
}

_getRequestDescription(leftSourceName, leftFieldName) {
const metrics = this.getMetricFields().map(esAggMetric => esAggMetric.getRequestDescription());
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hard to see in the diffs, but I removed getRequestDescription from ESAggField because it provided no value. So I just simplified the description for the _search request.

@@ -99,9 +99,7 @@ export class DynamicStyleProperty extends AbstractStyleProperty {
async getFieldMetaRequest() {
if (this.isOrdinal()) {
const fieldMetaOptions = this.getFieldMetaOptions();
return this._field.getOrdinalFieldMetaRequest({
Copy link
Contributor Author

Choose a reason for hiding this comment

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

sigma was not being used in the request. The request just returns standard deviation.

@jsanz
Copy link
Member

jsanz commented Mar 5, 2020

Apart from the categorical style to get the top term, is great that we can also visualize how representative the top term is! 🕺

image

Copy link
Contributor

@thomasneirynck thomasneirynck left a comment

Choose a reason for hiding this comment

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

tested in chrome

@nreese
Copy link
Contributor Author

nreese commented Mar 5, 2020

@elasticmachine merge upstream

@nreese
Copy link
Contributor Author

nreese commented Mar 6, 2020

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

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

@nreese nreese merged commit 578137f into elastic:master Mar 6, 2020
nreese added a commit to nreese/kibana that referenced this pull request Mar 6, 2020
* [Maps] top term percentage property

* populate percentage in feature properties

* TS work

* clean up TS

* fix all type errors

* unit test for esAggFieldsFactory

* clean up

* i18n cleanup

* do not show decimal place for perentage

* fix jest expects

* fix eslint errors

* tslint errors

* handle empty top bucket aggregation

Co-authored-by: Elastic Machine <[email protected]>
jloleysens added a commit to jloleysens/kibana that referenced this pull request Mar 6, 2020
…x-closed-index

* 'master' of github.com:elastic/kibana: (32 commits)
  [ML] Use Kibana's HttpHandler for HTTP requests (elastic#59320)
  [APM] Create settings page to manage Custom Links (elastic#57788)
  [Upgrade Assistant] Server-side batch reindexing (elastic#58598)
  completes navigation test (elastic#59141)
  [SIEM] Fixes dragging entries to the Timeline while data is loading may trigger a partial page reload (elastic#59476)
  [Reporting/Screenshots] Handle page setup errors and capture the page, don't fail the job (elastic#58683)
  [SIEM] [CASES] API with io-ts validation (elastic#59265)
  Use camelCase rather than snakeCase for plugin name (elastic#59461)
  [Maps] top term percentage field property (elastic#59386)
  Add custom action to registry and show actions list in siem (elastic#58395)
  [Search service] Add enhanced ES search strategy (elastic#59224)
  [Logs UI] Speed up stream rendering using memoization (elastic#59163)
  expand max-old-space-size for xpack jest tests (elastic#59455)
  Added possibility to embed connectors create and edit flyouts (elastic#58514)
  Revert "Temporarily disabling PR project mappings (elastic#59485)" (elastic#59491)
  Temporarily disabling PR project mappings (elastic#59485)
  [Endpoint] Fix alert list functional test error (elastic#59357)
  Rename status_page to statusPage (elastic#59186)
  Fix visual baseline job (elastic#59348)
  Extended AlertContextValue with metadata optional property (elastic#59391)
  ...

# Conflicts:
#	x-pack/plugins/upgrade_assistant/common/types.ts
#	x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_actions.ts
#	x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_service.test.ts
#	x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_service.ts
#	x-pack/plugins/upgrade_assistant/server/routes/reindex_indices/reindex_indices.test.ts
#	x-pack/plugins/upgrade_assistant/server/routes/reindex_indices/reindex_indices.ts
nreese added a commit that referenced this pull request Mar 6, 2020
* [Maps] top term percentage property

* populate percentage in feature properties

* TS work

* clean up TS

* fix all type errors

* unit test for esAggFieldsFactory

* clean up

* i18n cleanup

* do not show decimal place for perentage

* fix jest expects

* fix eslint errors

* tslint errors

* handle empty top bucket aggregation

Co-authored-by: Elastic Machine <[email protected]>

Co-authored-by: Elastic Machine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Maps] show top term percentage in tooltip
5 participants