Skip to content

Browser Warning due to missing willReadFrequently on heatmap #6740

@bebeal

Description

@bebeal

To reproduce, make a heatmap, open up the console and see:

plotly.js:114952 Canvas2D: Multiple readback operations using getImageData are faster with the willReadFrequently attribute set to true. See: https://html.spec.whatwg.org/multipage/canvas.html#concept-canvas-will-read-frequently
getPixels @ plotly.js:114952
vectorizeText @ plotly.js:114956
createText @ plotly.js:114946
tryVectorizeText @ plotly.js:113624
addItem @ plotly.js:113617
proto.update @ plotly.js:113619
createTextSprites @ plotly.js:113624
proto.update @ plotly.js:113562
createAxes @ plotly.js:113595
createScene @ plotly.js:113915
__webpack_modules__.33539.proto.tryCreatePlot @ plotly.js:52996
__webpack_modules__.33539.proto.initializeGLPlot @ plotly.js:53036
Scene @ plotly.js:52946
plot @ plotly.js:52053
__webpack_modules__.61549.exports.drawData @ plotly.js:36679
__webpack_modules__.71828.lib.syncOrAsync @ plotly.js:26541
continueAsync @ plotly.js:26537
Promise.then (async)
__webpack_modules__.71828.lib.syncOrAsync @ plotly.js:26543
_doPlot @ plotly.js:31810
newPlot @ plotly.js:31969
react @ plotly.js:33884
eval @ factory.js:89
Promise.then (async)
updatePlotly @ factory.js:79
componentDidMount @ factory.js:119
reappearLayoutEffects @ react-dom.development.js:23052
recursivelyTraverseReappearLayoutEffects @ react-dom.development.js:23156
reappearLayoutEffects @ react-dom.development.js:23038
...

This line needs updating:

var context = canvas.getContext('2d');
similar to #6084

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions