replace _all with Count for hierarchical data

This commit is contained in:
Joe Fleming 2015-08-13 11:34:04 -07:00
parent bbfba96c41
commit 8a03f4fd38

View file

@ -31,6 +31,7 @@ define(function (require) {
// If buckets is falsy then we should just return the aggs
if (!buckets) {
var label = 'Count';
var value = resp.aggregations
&& resp.aggregations[metric.id]
&& resp.aggregations[metric.id].value
@ -38,11 +39,11 @@ define(function (require) {
return {
hits: resp.hits.total,
raw: raw,
names: ['_all'],
names: [label],
tooltipFormatter: tooltipFormatter(raw.columns),
slices: {
children: [
{ name: '_all', size: value }
{ name: label, size: value }
]
}
};