Date format error when splitting a chart with date histogram

Hello,
I'm currently using 6.7

If I create a visualization (either a pie or a histogram) and split it with a Date histogram aggregation, the axis labels are not formatted (key in millisec is shown), while the tooltip correctly shows only the year (or the appropriate date format).

20190919_SplitChartDateHist

(BTW, testing it on [elastic demo] the situation is the opposite: the axis label is well-formatted, while in the tooltip it's shown in millisec).

Is it there any way to show the formatted key value (the date) also on axis label (maybe using the json input)?

Date field values should be formatted by default. I would guess that there's a mapping issue here. A few questions:

  • What does the mapping look like for your @timestamp field in your Elasticsearch indices?
  • If you look at your index pattern in the Kibana Management app, is the field listed as a date field?
  • Have you applied a custom date format for that field in your index pattern configuration?

Hello Matt,
thank you for your interest;

in order:

  • "@timestamp": { "type": "date" } for all the indices included in the kibana pattern
  • Yes, it's a date type field and is also the field used as for Time Filtering
  • No, in kibana it has the - Default - Format (Date)

Maybe it's not clear enough from the image I posted before, but this behavior only occurs when I use a Date Histogram aggregation in Split Chart, not in Axis or Split Series.

Hmm I tried to reproduce in 6.7.2 but I wasn't able to:

Could you click the "Inspect" button in the top menu, select "View: Requests" in the top right of the flyout, and click the Response tab? What does the info for one of the top level date histogram buckets look like? I see something like this:

"key_as_string": "2016-01-01T00:00:00.000-05:00",
"key": 1451624400000,
"doc_count": 21

Hi Matt,

the result is quite the same on my side:

"3": {
  "buckets": [
    {
      "key_as_string": "2019-09-25T00:00:00.000+02:00",
      "key": 1569362400000,
      "doc_count": 183
    },
    {
      "key_as_string": "2019-09-26T00:00:00.000+02:00",
      "key": 1569448800000,
      "doc_count": 37
    }
  ]
}

Only difference I'm using 6.7.0.
Reading through the release notes I don't find anything specific to this, but I assume it could have been fixed between 6.7.0 and 6.7.2.

Thank you again,
Paolo

Hello,

this only to confirm that the issue is not present in 6.7.2.

Regards,
Paolo

1 Like

Thanks for circling back! It must have been fixed as a side effect of another change.

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