Kibana fails to show future date on line chart


(Yu Watanabe) #1

I have kibana (v 5.1.1) configured to display future dates on line chart.

However, query seems to succeed but I get below error in the browser.

commons.bundle.js:38 TypeError: 
Cannot read property 'orderBucketsBySum' of undefined

    at Data.value (http://somehost:5601/bundles/kibana.bundle.js?v=14566:44:31056)
    at http://somehost:5601/bundles/kibana.bundle.js?v=14566:44:31664
    at Array.forEach (native)
    at Data.value (http://somehost:5601/bundles/kibana.bundle.js?v=14566:44:31482)
    at new Data (http://somehost:5601/bundles/kibana.bundle.js?v=14566:44:24195)
    at getData (http://somehost:5601/bundles/kibana.bundle.js?v=14566:46:16670)
    at Object.line (http://somehost:5601/bundles/kibana.bundle.js?v=14566:46:16818)
    at Vis.value (http://somehost:5601/bundles/kibana.bundle.js?v=14566:54:25848)
    at Function.uiState._uiStateChangeHandler (http://somehost:5601/bundles/kibana.bundle.js?v=14566:54:25729)
    at http://somehost:5601/bundles/commons.bundle.js?v=14566:55:663

Am I missing any configuration ? I thought this was working in v5.0.1


(Yu Watanabe) #2

Below is the full result of query and response.

Query:

{
  "query": {
    "bool": {
      "must": [
        {
          "query_string": {
            "query": "*",
            "analyze_wildcard": true
          }
        },
        {
          "query_string": {
            "analyze_wildcard": true,
            "query": "*"
          }
        },
        {
          "range": {
            "@timestamp": {
              "gte": 1479005148266,
              "lte": 1481597148266,
              "format": "epoch_millis"
            }
          }
        }
      ],
      "must_not": []
    }
  },
  "size": 0,
  "_source": {
    "excludes": []
  },
  "aggs": {
    "2": {
      "date_histogram": {
        "field": "ReportWeek",
        "interval": "1w",
        "time_zone": "Asia/Tokyo",
        "min_doc_count": 1
      },
      "aggs": {
        "1": {
          "avg": {
            "field": "AC"
          }
        },
        "3": {
          "avg": {
            "field": "EV"
          }
        },
        "4": {
          "avg": {
            "field": "PV"
          }
        }
      }
    }
  }
}

(Yu Watanabe) #3

Response:

{
  "took": 108,
  "timed_out": false,
  "_shards": {
    "total": 5,
    "successful": 5,
    "failed": 0
  },
  "hits": {
    "total": 108,
    "max_score": 0,
    "hits": []
  },
  "aggregations": {
    "2": {
      "buckets": [
        {
          "1": {
            "value": 0
          },
          "3": {
            "value": 0
          },
          "4": {
            "value": 16250
          },
          "key_as_string": "2017/01/30 00:00:00",
          "key": 1485702000000,
          "doc_count": 6
        },
        {
          "1": {
            "value": 0
          },
          "3": {
            "value": 0
          },
          "4": {
            "value": 41250
          },
          "key_as_string": "2017/02/06 00:00:00",
          "key": 1486306800000,
          "doc_count": 6
        },
        {
          "1": {
            "value": 0
          },
          "3": {
            "value": 0
          },
          "4": {
            "value": 70000
          },
          "key_as_string": "2017/02/13 00:00:00",
          "key": 1486911600000,
          "doc_count": 6
        },
        {
          "1": {
            "value": 0
          },
          "3": {
            "value": 0
          },
          "4": {
            "value": 98750
          },
          "key_as_string": "2017/02/20 00:00:00",
          "key": 1487516400000,
          "doc_count": 6
        },
        {
          "1": {
            "value": 0
          },
          "3": {
            "value": 0
          },
          "4": {
            "value": 126250
          },
          "key_as_string": "2017/02/27 00:00:00",
          "key": 1488121200000,
          "doc_count": 6
        },
        {
          "1": {
            "value": 0
          },
          "3": {
            "value": 0
          },
          "4": {
            "value": 167500
          },
          "key_as_string": "2017/03/06 00:00:00",
          "key": 1488726000000,
          "doc_count": 6
        },
        {
          "1": {
            "value": 0
          },
          "3": {
            "value": 0
          },
          "4": {
            "value": 221250
          },
          "key_as_string": "2017/03/13 00:00:00",
          "key": 1489330800000,
          "doc_count": 6
        },

(Yu Watanabe) #4
        {
          "1": {
            "value": 0
          },
          "3": {
            "value": 0
          },
          "4": {
            "value": 275000
          },
          "key_as_string": "2017/03/20 00:00:00",
          "key": 1489935600000,
          "doc_count": 6
        },
        {
          "1": {
            "value": 0
          },
          "3": {
            "value": 0
          },
          "4": {
            "value": 331250
          },
          "key_as_string": "2017/03/27 00:00:00",
          "key": 1490540400000,
          "doc_count": 6
        },
        {
          "1": {
            "value": 0
          },
          "3": {
            "value": 0
          },
          "4": {
            "value": 337500
          },
          "key_as_string": "2017/04/03 00:00:00",
          "key": 1491145200000,
          "doc_count": 6
        },
        {
          "1": {
            "value": 0
          },
          "3": {
            "value": 0
          },
          "4": {
            "value": 341250
          },
          "key_as_string": "2017/04/10 00:00:00",
          "key": 1491750000000,
          "doc_count": 6
        },
        {
          "1": {
            "value": 0
          },
          "3": {
            "value": 0
          },
          "4": {
            "value": 385000
          },
          "key_as_string": "2017/04/17 00:00:00",
          "key": 1492354800000,
          "doc_count": 6
        },
        {
          "1": {
            "value": 0
          },
          "3": {
            "value": 0
          },
          "4": {
            "value": 408750
          },
          "key_as_string": "2017/04/24 00:00:00",
          "key": 1492959600000,
          "doc_count": 6
        },
        {
          "1": {
            "value": 0
          },
          "3": {
            "value": 0
          },
          "4": {
            "value": 462500
          },
          "key_as_string": "2017/05/01 00:00:00",
          "key": 1493564400000,
          "doc_count": 6
        },
        {
          "1": {
            "value": 0
          },
          "3": {
            "value": 0
          },
          "4": {
            "value": 513750
          },
          "key_as_string": "2017/05/08 00:00:00",
          "key": 1494169200000,
          "doc_count": 6
        },
        {
          "1": {
            "value": 0
          },
          "3": {
            "value": 0
          },
          "4": {
            "value": 522500
          },
          "key_as_string": "2017/05/15 00:00:00",
          "key": 1494774000000,
          "doc_count": 6
        },
        {
          "1": {
            "value": 0
          },
          "3": {
            "value": 0
          },
          "4": {
            "value": 526250
          },
          "key_as_string": "2017/05/22 00:00:00",
          "key": 1495378800000,
          "doc_count": 6
        },
        {
          "1": {
            "value": 0
          },
          "3": {
            "value": 0
          },
          "4": {
            "value": 526250
          },
          "key_as_string": "2017/05/29 00:00:00",
          "key": 1495983600000,
          "doc_count": 6
        }
      ]
    }
  },
  "status": 200
}

(Shaunak Kashyap) #5

Hi @YuWatanabe,

Thanks for the detailed report. This sounds like a bug. I've created an issue for it in the Kibana issue tracker on GitHub: https://github.com/elastic/kibana/issues/9458.

If you have a user on GitHub, you may like to subscribe to that issue so you can receive updates. Also, feel free to add any more comments to the issue.


(Yu Watanabe) #6

Hi Shaunak.

Ok thanks. I will take track of the git hub isaue.


(system) #7

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.