Responsive
Charts auto-resize by default — responsive: true is the default. SwiftChart attaches a ResizeObserver to the container and re-renders on size changes.
new LineChart('#chart', { responsive: true }); // defaultnew LineChart('#chart', { responsive: false }); // pin to initial sizeWhen responsive is off, you can still trigger a resize manually:
chart.resize();In React, call ref.current?.resize() — see React refs.
The chart respects devicePixelRatio automatically, so output stays crisp on Retina displays.