@tanstack/charts
Version:
A chart grammar for TypeScript and JavaScript. Marks consume your data directly, channels describe visual encodings, and the engine compiles them into a renderer-neutral keyed scene. TanStack's compact scales cover common numeric and categorical mappings.
25 lines (24 loc) • 717 B
JavaScript
const chartRendererMotion = /* @__PURE__ */ Symbol("tanstack-charts-renderer-motion");
function rendererMotionCapability(renderer) {
return renderer[chartRendererMotion];
}
function tooltipMotionController(context) {
return context[chartRendererMotion];
}
function connectRendererTooltipMotion(renderer, context, transition) {
const capability = rendererMotionCapability(renderer);
if (capability) {
const motionContext = context;
motionContext[chartRendererMotion] = capability.createTooltip({
container: context.container,
transition
});
}
return context;
}
export {
chartRendererMotion,
connectRendererTooltipMotion,
rendererMotionCapability,
tooltipMotionController
};