Heatmap with ordered bucket

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
2.17.1

Describe the issue:

Hello,

Build a heatmap chart using 2 histograms to agg the data in the buckets on X and Y-axis in order to have a fixed matrix 4x4.

By default it gives me:
[1,4][2,4][3,4][4,4]
[1,3][2,3][3,3][4,3]
[1,2][2,2][3,2][4,2]
[1,1][2,1][3,1][4,1]

However, in real life these coordinates represent the real position of hardware ([X,Y]):
[4,1] [3,1] [2,1] [1,1]
[4,2] [3,2] [2,2] [1,2]
[4,3] [3,3] [2,3] [1,3]
[4,4] [3,4] [2,4] [1,4]

So to transform the default matrix I use the advanced field json:
{“order”": { “_key”: “desc” } } on both x-axis and y-axis to force the transformation but only the y-axis seems to work:

[1,1][2,1][3,1][4,1]
[1,2][2,2][3,2][4,2]
[1,3][2,3][3,3][4,3]
[1,4][2,4][3,4][4,4]

Any ideas?
Thanks

@PrinceActa I’ve repro your issue in 2.17.1, 2.11.0, 2.4.0 and 7.10.2 (OpenSearch fork).
The heatmap was always working like that.

I’ve noticed that you’ve created a GitHub issue. I’ll share the link here for traceability.

Yes but (for me) it isn’t logical so yes I’ve created a GitHub issue :wink: