Heatmap: Adjust chart height on redraw with new data


I struggle with a nice auto-adapting height when I updated (extended) my Heatmap data and redraw the chart.

Of course I could update the height manually, but I really, really wonder what’s the suggested way I can add data to a heatmap chart and avoid that my heatmap cells are getting smaller and smaller because they apparently have to fit within the dimensions the chart was initialized with — also in autosize: true mode? I personally would expect that with autosizing enabled the heatmap will grow in height to guarantee same heatmap cell dimensions before and after the redraw.

So do I get it right that I have to manually set a new height on every redraw and with that to calculate this height by using — from somewhere — the original cell dimensions (esp. the height)? Or how is that intended to work?

Are there any demos about updated Heatmaps with new, extended data rows? Would love to see some and how it is accomplished.

1 Like

At the moment, this is the only to do so.

plotly.js doesn’t have an autosize mode that depends on the data .