apache / superset

Apache Superset is a Data Visualization and Data Exploration Platform
https://superset.apache.org/
Apache License 2.0
62.8k stars 13.87k forks source link

fix: Allows X-Axis Sort By for custom SQL #30393

Closed michael-s-molina closed 1 month ago

michael-s-molina commented 1 month ago

SUMMARY

This PR fixes an issue where the X-Axis Sort By control was disappearing when a custom SQL was being used as an x-axis. Given that we currently have no way to identify the result type of a custom SQL, we make the control available and give the responsibility to the user to provide a sortable result. We implement the same behavior for the Time Grain control as you can see in the recordings.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

https://github.com/user-attachments/assets/f40cbd8c-c957-45b7-83be-0df5a5f25ec3

https://github.com/user-attachments/assets/c4a48703-95c8-4780-a669-e101e214ac9d

TESTING INSTRUCTIONS

Check the videos for instructions.

ADDITIONAL INFORMATION