MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / useChart

Function useChart

packages/react/src/components/chart.tsx:42–50  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

40const ChartContext = React.createContext<ChartContextProps | null>(null);
41
42function useChart() {
43 const context = React.useContext(ChartContext);
44
45 if (!context) {
46 throw new Error("useChart must be used within a <ChartContainer />");
47 }
48
49 return context;
50}
51
52function ChartContainer({
53 id,

Callers 2

ChartTooltipContentFunction · 0.85
ChartLegendContentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected