[maps] fix Color ramp UI for percent of a top term in join layer is broken (#122718) (#123041)

* [maps] fix Color ramp UI for percent of a top term in join layer is broken

* add comments and make more explicit

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit faa2afb59c)

Co-authored-by: Nathan Reese <reese.nathan@gmail.com>
This commit is contained in:
Kibana Machine 2022-01-14 10:08:10 -05:00 committed by GitHub
parent c87fff15e4
commit 34a40acda8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -23,8 +23,13 @@ export class TopTermPercentageField implements IESAggField {
}
supportsFieldMetaFromLocalData(): boolean {
// Elasticsearch vector tile search API does not support top term metric
return false;
if (this.getSource().isMvt()) {
// Elasticsearch vector tile search API does not support top term metric so meta tile does not contain any values
return false;
} else {
// field meta can be extracted from local data when field is geojson source
return true;
}
}
getSource(): IVectorSource {