We’re using Plotly.js to create all kind of good looking graphics that can gracefully accommodate to any resolution using the
responsive: true option in the layout.
However we want certain plots to be displayed only with a square ratio (the chart area only, not the legends), fitting itself to the maximum available width/height available, but preserving the square shape.
Very much like the ternary plots work, where if the ternary plot is rendered in a 1280x400px canvas, the triangle will be 400px height as máximum.
Is there any way to achieve this without resorting to use a fixed width/height (which should discount the legend too).
Bonus points: This should work when displayed as subplots as well, or even more importantly, because for single plots I can do some “tricks” with the container sizing using CSS/flexbox.
Thanks in advance.