Skip to content

Commit 6b06516

Browse files
committed
heatmap: handle categorical axis sorting except for (contour)carpet
1 parent a34ca45 commit 6b06516

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/traces/heatmap/clean_2d_array.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@ module.exports = function clean2dArray(zOld, transpose, trace, xa, ya) {
3232

3333
var xMap = function(i) {return i;};
3434
var yMap = function(i) {return i;};
35-
if(trace && trace.type === 'heatmap') {
35+
if(trace && trace.type !== 'carpet' && trace.type !== 'contourcarpet') {
3636
if(ya && ya.type === 'category') {
37-
yMap = function(i) {return trace._y[i];};
37+
if(trace._y.length) yMap = function(i) {return trace._y[i];};
3838
}
3939
if(xa && xa.type === 'category') {
40-
xMap = function(i) {return trace._x[i];};
40+
if(trace._x.length) xMap = function(i) {return trace._x[i];};
4141
}
4242
}
4343

0 commit comments

Comments
 (0)