-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
Description
At the moment, image
trace will only get fast rendering if axes are compatible as per:
plotly.js/src/traces/image/plot.js
Line 34 in f7baf5d
var fastImage = supportsPixelatedImage && !trace._hasZ && trace._hasSource && compatibleAxis(xa) && compatibleAxis(ya); |
However, compatibleAxis
here is a bit too strict since there's no reason we couldn't support both reversed and normal linear axes:
plotly.js/src/traces/image/plot.js
Lines 18 to 22 in f7baf5d
function compatibleAxis(ax) { | |
return ax.type === 'linear' && | |
// y axis must be reversed but x axis mustn't be | |
((ax.range[1] > ax.range[0]) === (ax._id.charAt(0) === 'x')); | |
} |
Basically, we should 🔪 line 21 and then proceed to get the positioning right as well as the correct hover labels for any order of the axes 😸