mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[Maps] Add date-fields to metrics selection (#62629)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This commit is contained in:
parent
90e6f2ca6d
commit
2023663104
1 changed files with 6 additions and 1 deletions
|
@ -24,8 +24,13 @@ function filterFieldsForAgg(fields, aggType) {
|
|||
return getTermsFields(fields);
|
||||
}
|
||||
|
||||
const metricAggFieldTypes = ['number'];
|
||||
if (aggType !== AGG_TYPE.SUM) {
|
||||
metricAggFieldTypes.push('date');
|
||||
}
|
||||
|
||||
return fields.filter(field => {
|
||||
return field.aggregatable && field.type === 'number';
|
||||
return field.aggregatable && metricAggFieldTypes.includes(field.type);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue