The user's config object, looked up by configKey.
The property name on config to check.
Canonical key used when user is silent.
Alternative keys to try if defaultKey is missing.
First D3-bound datum; used only when the user was silent and the default key is missing.
A DataAccessor ready to pass to resolveAccessor.
Resolves a string accessor with optional fallback-key inference.
Call AFTER queryD3Elements returns so the first datum can be sampled. When the user did NOT provide an explicit accessor (
config[configKey]isundefined), and the canonicaldefaultKeyis missing from the first datum, each name inalternativesis tried in order. The first alternative present on the datum is returned. If nothing matches,defaultKeyis returned — which will trigger the helpful "Available properties: …" error inside resolveAccessor.When the user DID provide an accessor (string or function), it is returned verbatim — explicit user intent always wins.
The
configparameter is typed asobjectso each binder's typed config (e.g.D3BarConfig) can be passed directly without theas unknown as Record<string, unknown>double-cast at the call site. The narrowing to a string-keyed record is performed once, internally.