Skip to content

Commit

Permalink
Fix visualizations for rollups using fixed_interval or calendar_inter…
Browse files Browse the repository at this point in the history
…val (elastic#39537)

* Fix visualizations for rollups using fixed_interval

* Update to support calendar_interval as well
  • Loading branch information
Wylie Conlon authored and wylieconlon committed Jun 28, 2019
1 parent b275f44 commit 85a1c0e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion x-pack/plugins/rollup/public/visualize/editor_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ export function initEditorConfig() {

// Set date histogram time zone based on rollup capabilities
if (aggTypeName === 'date_histogram') {
const interval = fieldAgg.interval;
// Interval is deprecated on date_histogram rollups, but may still be present
// See https://github.com/elastic/kibana/pull/36310
const interval = fieldAgg.calendar_interval || fieldAgg.fixed_interval || fieldAgg.interval;
return {
useNormalizedEsInterval: {
fixedValue: false,
Expand Down

0 comments on commit 85a1c0e

Please sign in to comment.