MCPcopy Create free account
hub / github.com/Thanas-R/Virdis / useChart

Function useChart

src/components/ui/chart.tsx:22–30  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

20const ChartContext = React.createContext<ChartContextProps | null>(null);
21
22function useChart() {
23 const context = React.useContext(ChartContext);
24
25 if (!context) {
26 throw new Error("useChart must be used within a <ChartContainer />");
27 }
28
29 return context;
30}
31
32const ChartContainer = React.forwardRef<
33 HTMLDivElement,

Callers 1

chart.tsxFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected