mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[aggTypes/count] always format the value as a number
This commit is contained in:
parent
874c32e01b
commit
e4b07e8689
1 changed files with 4 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
|||
define(function (require) {
|
||||
return function AggTypeMetricCountProvider(Private) {
|
||||
var MetricAggType = Private(require('components/agg_types/metrics/_metric_agg_type'));
|
||||
var fieldFormats = Private(require('registry/field_formats'));
|
||||
|
||||
return new MetricAggType({
|
||||
name: 'count',
|
||||
|
@ -9,6 +10,9 @@ define(function (require) {
|
|||
makeLabel: function () {
|
||||
return 'Count';
|
||||
},
|
||||
getFormat: function () {
|
||||
return fieldFormats.getDefaultInstance('number');
|
||||
},
|
||||
getValue: function (agg, bucket) {
|
||||
return bucket.doc_count;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue