opensearch-project / OpenSearch-Dashboards

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

[BUG] Sorting is not working as expected in TSVB visualization #2675

Open CCongWang opened 1 year ago

CCongWang commented 1 year ago

Describe the bug

Sorting is not working correctly in TSVB visualization after changing global filter

To Reproduce Steps to reproduce the behavior:

  1. Add eCommerce sample data

  2. Create TSVB visualization with the following config, I need to choose ignore global filter as yes

    Screen Shot 2022-10-26 at 10 41 02 AM Screen Shot 2022-10-26 at 10 42 46 AM
  3. Add the TSVB visualization to eCommerce dashboards, change the sorting to sort by count ascendingly

Screen Shot 2022-10-26 at 10 51 51 AM
  1. Use the [eCommerce] Controls to add a category as filter, now the sorting arrow goes to Category Type, but the table is still sorted by count Screen Shot 2022-10-26 at 4 15 37 PM

Expected behavior

The sorting in TSVB visualization should keep the same, and the sorting arrow should reflect the sorting

OpenSearch Version 1.3.2

Dashboards Version 1.3.2

Plugins

Query Workbench, Reporting, Alerting, Anomaly Detection, Observability, Index Management, Security

Screenshots

see reproducing steps

Host/Environment (please complete the following information):

Additional context

Add any other context about the problem here.

CCongWang commented 1 year ago

Hi team, any updates?

ananzh commented 1 year ago

Let me reproduce it. Thanks @CCongWang for opening this issue.

ananzh commented 1 year ago

I could not reproduce it. I used both 1.3.2 and current main. I could sort by category and count. Below images are from 1.3.2

Screen Shot 2022-11-01 at 10 24 03 Screen Shot 2022-11-01 at 10 25 07
AMoo-Miki commented 1 year ago

What i observed is that the sorting remains as it was chosen (which is good) but the arrow jumped over which is the problem.

ananzh commented 1 year ago

We reproduced the issue. Ideal fix should be to allow customer keep the sort state before refresh.

CCongWang commented 1 year ago

Hi team, any updates?

ahopp commented 1 year ago

@AMoo-Miki @ananzh Can we check is this is still an issue in the current version? I've seeing the correct behavior in the playground but I might be missing something.

If it is still an issue, @dagneyb is this something we can prioritize?

ananzh commented 1 year ago

@ahopp @dagneyb Yes it is still an issue.

alan89202 commented 4 months ago

hello, any update on this issue?