useChartInstance: () => ChartInstanceReturns the underlying ChartInstance for the surrounding <ChartContainer>. Use this to call imperative methods (e.g. addSeries, setSeriesData, resetZoom) from inside child components. Must be called from a component rendered inside a <ChartContainer> — calling it outside throws.
import { useChartInstance } from '@wick-charts/react'; function ResetButton() { const chart = useChartInstance(); return <button onClick={() => chart.resetZoom()}>Reset</button>;}