As of today this elements only returns date histogram based on UTC time.
The consequence is that the histogram does not display correct values in the user timezone.
Example:
A document is created on April 1st at 8am in Japan. Japan time UTC+9 so the document will be counted in the March 31st bucket in the aggregate.
The date histogram aggregate has a timezone parameter to solve this problem
https://www.elastic.co/guide/en/elasticsearch/reference/6.5/search-aggregations-bucket-datehistogram-aggregation.html
the timezone parameter can be initialized this way to use the client timezone
timezone: { type: String, value: function() { return moment().format("Z"); } }
and then added to the object initialized at this line:
https://github.com/nuxeo/nuxeo-dataviz-elements/blob/e2394040cf000e151cd5af9c3b032c1141ee16d0/nuxeo-aggregate-data-behavior.html#L215
This issue can be seen in the default dashboards in Webui.
- is required by
-
NXP-27231 Analytics should take the time and timezone into consideration
- Open