plotly/plotly.js · error
cannot use zsmooth: "fast": <msg>
Error message
cannot use zsmooth: "fast": <msg>
What it means
Graceful-degradation warning emitted by noZsmooth in heatmap (and contour) calc. zsmooth:'fast' only works when x and y coordinates are evenly spaced (linear scale) and there are no axis rangebreaks; when scaleIsLinear detects uneven spacing (or another precondition fails, e.g. mismatched coordinate arrays), the fast nearest-neighbor interpolation cannot be applied correctly. Plotly then silently downgrades zsmooth to false on the trace and warns instead of throwing — the message records why the downgrade happened.
Source
Thrown at src/traces/heatmap/calc.js:89
z = dropZonBreaks(x, y, z);
if(!isHist) {
x = skipBreaks(x);
y = skipBreaks(y);
trace._x = x;
trace._y = y;
}
}
if(!isHist && (isContour || trace.connectgaps)) {
trace._emptypoints = findEmpties(z);
interp2d(z, trace._emptypoints);
}
function noZsmooth(msg) {
zsmooth = trace._input.zsmooth = trace.zsmooth = false;
Lib.warn('cannot use zsmooth: "fast": ' + msg);
}
function scaleIsLinear(s) {
if(s.length > 1) {
var avgdx = (s[s.length - 1] - s[0]) / (s.length - 1);
var maxErrX = Math.abs(avgdx / 100);
for(i = 0; i < s.length - 1; i++) {
if(Math.abs(s[i + 1] - s[i] - avgdx) > maxErrX) {
return false;
}
}
}
return true;
}
// Check whether all brick are uniform
trace._islinear = false;
if(xa.type === 'log' || ya.type === 'log') {View on GitHub (pinned to 1d090e0b5f)
Solutions
- Supply evenly spaced x/y coordinates (constant step) to use zsmooth:'fast'.
- Remove axis rangebreaks that make coordinate spacing irregular.
- Use zsmooth:'best' (or default) which handles irregular spacing.
- Ignore the warning if the automatic fallback to zsmooth:false is acceptable.
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at src/traces/heatmap/calc.js:89 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of plotly/plotly.js@1d090e0b5f (2026-09-02).
Data as JSON: /api/errors/2a5c442f37397479.
Report an issue: GitHub.