useChartTheme
Documentation / @elitechart/react / useChartTheme
Defined in: react/src/use-chart-theme.ts:37
Theme state hook for a <Chart /> instance.
Returns a [theme, setTheme] tuple identical in shape to
useState. Whenever setTheme runs (or the handle transitions
from null to a live engine), the new theme is pushed through to
chart.setTheme(theme). No-ops while handle is null.
Parameters
handle
ChartHandle | null
initial
Returns
readonly [ChartForgeTheme, (theme) => void]