opensearch-project / OpenSearch-Dashboards

📊 Open source visualization dashboards for OpenSearch.
https://opensearch.org/docs/latest/dashboards/index/
Apache License 2.0
1.7k stars 898 forks source link

[BUG] Heatmap Y-axis does not sort correctly #882

Open ghost opened 3 years ago

ghost commented 3 years ago

Describe the bug

The Y-axis of a heatmap visualization does not sort correctly when using (at least) a Histogram or Date Histogram aggregation for that axis.

To Reproduce Steps to reproduce the behavior:

  1. Create a heatmap visualization
  2. Use a date histogram for the X-axis
  3. Use either a date histogram or (regular) histogram for the y-axis

Expected behavior Y-axis buckets should be sorted

OpenSearch Version "OpenSearch 1.0" (via AWS OpenSearch)

Dashboards Version OpenSearch 1.0

Plugins

N/A

Screenshots

image

Host/Environment (please complete the following information):

Additional context

HeatMap is the closest thing OpenSearch / Kibana offers to a scatterplot, and has historically worked ok for this use case. However this bug severely limits eliminates heatmap's usefulness for visualizing two dimensional data.

adrien-cahoreau commented 2 years ago

The sort bug on sub-aggregations affects not only the heatmap, but also other visualisations. Since years, there are several reports of this bug on Kibana :

And Elastic plans to fix it mainly in its own Lens : elastic/kibana#86184

However, this bug has been fixed recently on the Kibana's heatmap (8.1) with a new implementation from elastic-charts : elastic/kibana#118338

WhereDidTheBirdsGo commented 2 years ago

As a workaround, try setting the 'extend bounds' values for the Y to encompassing values. Not perfect, for me it sorted it upside-down, but at least it's readable now.