Wick Charts

useTheme

useTheme: () => ChartTheme

Reads the current ChartTheme from the surrounding theme context. Use this when authoring custom render-props / slots (Tooltip, InfoBar, Legend) so your overlay matches the active theme.

Example

import { useTheme } from '@wick-charts/react';
 
function MyOverlay() {
const theme = useTheme();
 
return <div style={{ background: theme.tooltip.background }}></div>;
}