UNPKG

@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.

17 lines (16 loc) 660 B
import { applyMarkRenderer, normalizeMarkInitialization } from "./mark.js"; function createMarkWithScaleValues(initialize, motion, renderer) { const normalizedInitialize = (context) => { const initialized = normalizeMarkInitialization(initialize(context)); const withMotion = motion === void 0 || initialized.motion !== void 0 ? initialized : { ...initialized, motion }; return renderer === void 0 ? withMotion : applyMarkRenderer(withMotion, renderer); }; return { initialize: normalizedInitialize, ...motion === void 0 ? {} : { motion }, ...renderer === void 0 ? {} : { renderer } }; } export { createMarkWithScaleValues };