I'm trying to sort a vertical bar Chart by a agregation of maximum date like this:
"cc_mes_ano_registro" is a scripted field that returns the Month
and Year of a date field(data_de_registro) as a string (because string fields are aligned in the center of bars as you can see in "December - 2018"), but there's a problem:
As you can see, March, July and August - 2018 are ahead of July 2019.
In other words, it is not ordered by the maximum date in each bucket.
You can use the Inspect button on your Visualization to see the results of the query. You can also change the View from Data to Requests to see the request and response sent to/from Elasticsearch. This might offer a clue why the ordering is not what you are looking for. https://www.elastic.co/guide/en/kibana/current/vis-inspector.html
My field local_trabalho.keyword have some null data, and this is breaking the axis order.
So I did a scripted field that returns "N/I" for null values and solved the problem.
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.