Skip to main content
The sizing prop on GraphRenderer decides how the chart claims space in its container. It defaults to responsive.

Responsive

The chart fills its parent container and re-lays out when the container resizes. Give the parent a size:

Fixed

Explicit pixel dimensions, ignoring the container:
Useful for image export or thumbnails where the output size must be exact.

Keep aspect ratio

The chart scales to the container’s width while holding a ratio — good for cards in a responsive grid. Provide an intrinsic size, or one dimension plus an aspectRatio:

Reacting to resize

onResize fires with the new size in every mode: