Chart Selection
Hoisted selection state for charts that support selecting a single data point (e.g. a pie slice).
Create with rememberChartSelection for interactive charts, or staticChartSelection for an initialized selection used in screenshots and tests. Neither factory disables interaction or animation. The index refers to source data, not an aggregated drawing index; charts are responsible for interpreting it and checking data bounds.
Parameters
on Selection Changed
Optional callback invoked after a different index is selected or cleared.
initial Index
The initially selected index, or null for no initial selection.