We have data and time field in X axis and we are showing data on X axis from today to today+25 records. e.g 3Dec, 2 Dec, 1 Dec, 30 Nov, 29 Nov etc.
We need to show total 25 data count in reverse order.
e.g 25 Nov, 26 Nov,27 Nov, 28 Nov, ....... 2 Dec, 3 Dec, 4Dec.
Could you please suggest any solution for the same?
Please find below snapshot of Descending and Ascending order.
We want to see data from today to last 25 records (e.g 4 Dec to 25th Nov ). Current we are unable to achieve the same using ascending order.
Please suggest me if there any changes is required.
Instead of using terms aggregation on x-axis and alphabetical sorting, I'd suggest to use date-histogram aggregation. For this your field should be a timestamp instead of formatted date string.
@dosant - If I used data histogram then I am unable to see time on X axis. In additional to this it was not showing all the dates. Please refer below snapshot.
Do you have any solution for the problem.?
So your requirement is to display exact data and time per bar on x-axis? Then indeed I think data-histogram wouldn't work and terms seems more appropriate
Maybe you can change formatting of your start string such that alpabetical sorting matches time sorting?
e.g.:
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.