Description
EDIT: This was a two-part issue. The original description remains but title has been changed. See issue XXX for second part of issue related to y-axis sorting.
Bug description
Observed on Superset 5.0.0, the deployment relies on a fork of Superset OSS version 5.0.0rc1. It's deployed in a EC2 instance using docker compose.
The Heatmap chart seems to sort the Y-axis through some unknown logic.
A similar issue was raised before for Heatmap chart at #31318 and was stated to be fixed in PR #31752.
Another similar issue: #32591 still open, but the issue reporter has a different Superset version.
Regardless of whether there is a string or numeric value on the Y-axis, sorting does not seem to make sense as it does not seem to be in alphabetical or numeric order.
In addition, it renders all the 0 values as on both the x and y axis, and possibly also on the heatmap grids.
Screenshots/recordings

In this screenshot:
-
0 values rendered as
<NULL>
on axes:- 0 in
ret_col
andret_row
is displayed as<NULL>
on the X and Y axes. - The raw data clearly includes 0 (see Results on the bottom right corner), so it should not be shown as null.
- 0 in
-
Y-axis sorting is inconsistent:
- Even when “Sort Y Axis” is set to “Axis ascending”, the Y-axis values are not ordered numerically.
- Y-axis order appears to depend on the order of values in the X-axis or underlying data groupings, this can be observed in the Results on the bottom right corner:
ret_row
is what on the y-axis, and it's order in the Results is the same as the order on the heatmap.

In this screenshot:
- When
test_value
is 0, it's not being displayed on the plot. It doesn't have a grid with 0 in it, as the grids for test_value=1. I also don't see anything when hover over it.
Superset version
master / latest-dev
Python version
3.9
Node version
16
Browser
Chrome
Additional context
No response
Checklist
- I have searched Superset docs and Slack and didn't find a solution to my problem.
- I have searched the GitHub issue tracker and didn't find a similar bug report.
- I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.