diff --git a/src/ui/public/agg_types/buckets/date_histogram.js b/src/ui/public/agg_types/buckets/date_histogram.js index d99562e117221..03bf6aa3f9b05 100644 --- a/src/ui/public/agg_types/buckets/date_histogram.js +++ b/src/ui/public/agg_types/buckets/date_histogram.js @@ -41,7 +41,7 @@ export default function DateHistogramAggType(timefilter, config, Private) { makeLabel: function (agg) { const output = this.params.write(agg); const params = output.params; - const field = params.field || agg.params.field.displayName || ''; + const field = params.field || _.get(agg, 'params.field.displayName', ''); return field + ' per ' + (output.metricScaleText || output.bucketInterval.description); }, createFilter: createFilter,