{"record":{"id":"2a5c442f37397479","repo":"plotly/plotly.js","slug":"cannot-use-zsmooth-fast-msg","errorCode":null,"errorMessage":"cannot use zsmooth: \"fast\": <msg>","messagePattern":"cannot use zsmooth: \"fast\": <msg>","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/traces/heatmap/calc.js","lineNumber":89,"sourceCode":"        z = dropZonBreaks(x, y, z);\n\n        if(!isHist) {\n            x = skipBreaks(x);\n            y = skipBreaks(y);\n\n            trace._x = x;\n            trace._y = y;\n        }\n    }\n\n    if(!isHist && (isContour || trace.connectgaps)) {\n        trace._emptypoints = findEmpties(z);\n        interp2d(z, trace._emptypoints);\n    }\n\n    function noZsmooth(msg) {\n        zsmooth = trace._input.zsmooth = trace.zsmooth = false;\n        Lib.warn('cannot use zsmooth: \"fast\": ' + msg);\n    }\n\n    function scaleIsLinear(s) {\n        if(s.length > 1) {\n            var avgdx = (s[s.length - 1] - s[0]) / (s.length - 1);\n            var maxErrX = Math.abs(avgdx / 100);\n            for(i = 0; i < s.length - 1; i++) {\n                if(Math.abs(s[i + 1] - s[i] - avgdx) > maxErrX) {\n                    return false;\n                }\n            }\n        }\n        return true;\n    }\n\n    // Check whether all brick are uniform\n    trace._islinear = false;\n    if(xa.type === 'log' || ya.type === 'log') {","sourceCodeStart":71,"sourceCodeEnd":107,"githubUrl":"https://github.com/plotly/plotly.js/blob/1d090e0b5ffb8d0fdf6e0e4ff51d3f3cf67f1314/src/traces/heatmap/calc.js#L71-L107","documentation":"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.","triggerScenarios":"Thrown at src/traces/heatmap/calc.js:89 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"1d090e0b5ffb8d0fdf6e0e4ff51d3f3cf67f1314","analyzedAt":"2026-09-02T22:03:39.906Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-10T02:17:09.455Z"}