Getting "Aw, Snap! Something went wrong while displaying this web page." error for around 21K data

Heat map crashed browser for around 21k data “Aw, Snap! Something went wrong while displaying this web page.”(Chrome)

Could you at least share a link to the graph you’re referring to?

Had setup example at https://jsfiddle.net/sathishvenkat/rfavz9xg/8/ (crashes)
and data at https://sathishvenkat.github.io/figure.js

Html

    <script type="text/javascript" src="https://cdn.plot.ly/plotly-latest.min.js"></script>
        
        
    <script type="text/javascript" src="figure.js"></script>
    
    <div id="plotly_holder" style="width: 100%; height: 100%;" class="plotly-graph-div"></div>
    <script type="text/javascript">
        (function(){
            window.PLOTLYENV={'BASE_URL': 'https://plot.ly'};

            var gd = document.getElementById('plotly_holder')
            var resizeDebounce = null;

            function resizePlot() {
                var bb = gd.getBoundingClientRect();
                Plotly.relayout(gd, {
                    width: bb.width,
                    height: bb.height
                });
            }

            

            
            Plotly.plot(gd,  {
                data: figure.data,
                layout: figure.layout,
                frames: figure.frames,
                config: {"linkText": "Export to plot.ly", "showLink": true}
            });
            
       }());
    </script>
</body>

Have you tried using scattergl instead for your big-data needs?

Hi Etienne,

We need heatmap :frowning: . Whats the max points heatmap can handle ?

Way more than 21k that’s for sure (I recall making 1e6-pt heatmap not too long ago).

I’m not sure what’s going here.

Ha I see, your z heatmap data is 1D. plotly.js probably blows up when trying to re-arrange it to a 2D (our common denominator for heatmap) - which is a pretty heavy operation.

I suggest using a 2D z instead.

Hi Etienne,

Thanks, Does Plotly have any python package for converting from 1D to 2D?

@svenkat To go from x,y,z triplets to a 2D z-array, you could use numpy: