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
Add significant terms in tag cloud visualization #17770
Conversation
💔 Build Failed |
💚 Build Succeeded |
@@ -92,7 +92,11 @@ export class TagCloudVisualization { | |||
} | |||
|
|||
const data = response.tables[0]; | |||
this._bucketAgg = this._vis.aggs.find(agg => agg.type.name === 'terms'); | |||
if (this._vis.aggs.bySchemaName.segment) { | |||
this._bucketAgg = this._vis.aggs.bySchemaName.segment[0]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this might throw, if segment doesn't have any elements ... maybe use lodash ?
this._bucketAgg = _.get(this, '_vis.aggs.bySchemaName.segment[0]', null)
💚 Build Succeeded |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* Allow significant terms for tag cloud * Fix request before terms aggregation has configured * Check if at least one agg is in array
significant term returns 2 values, the significance and the count they are both important. Would it be possible to have one on the size of the term and the other say on the hint on hoover? |
@jccq Please feel free to open a feature request, to add tooltips to tag cloud in general. Currently Tagcloud doesn't show any tooltips, so the values could be shown (as in other charts) in a tooltip. |
Significant terms agg should really be used for structured fields only. |
Resolves #9502
You can now use significant terms aggregation in tagcloud.