Skip to content

Documentation / @finchart/react / ChartPane

Function: ChartPane() ​

ChartPane(__namedParameters): Element | null

Defined in: react/src/components/chart-pane.tsx:84

A region sharing one value axis. Series placed inside it are drawn on top of each other.

The first <ChartPane> uses the mainPane a Plot always has, as-is. Creating a new one instead would leave an empty mainPane sitting at the top, taking up space for nothing. When the pane holding it goes, the main pane stays on the chart without the series that were inside this wrapper (series outside any pane stay on it): it goes back to the top at the next restack, and the next <ChartPane> to arrive — mounted, or shown again by <Activity> — takes it.

A Suspense boundary hiding it leaves its pane on the chart as it is — series, the user's divider drag and axis range, the components inside and their state — so a component inside may suspend within the pane's own boundary; showing it applies any prop that changed meanwhile. While hidden it stays right after the pane it followed, whatever goes around it, so a pane inserted between that one and it meanwhile sits after it until it shows again; the reveal then puts the panes in JSX order. (React 19's development StrictMode replays effects on the reveal: a pane hidden on its own is rebuilt instead, the components inside it starting over, and a chart hidden whole gets a new Plot.)

An <Activity> hiding it takes the pane off the chart (a main pane it holds stays, with its own scale back), and showing it builds the pane afresh from the props it has then, in its JSX place: what the user did to the old pane does not come back, and the components inside it start over.

Parameters ​

__namedParameters ​

ChartPaneProps

Returns ​

Element | null