Documentation / @ripl/charts / resolveAccessor
Function: resolveAccessor() ​
resolveAccessor<
TData,TValue>(accessor): (item) =>TValue
Defined in: charts/src/core/data.ts:34
Normalizes an Accessor into a function. Property keys read the field, functions are passed through, and any other value is treated as a constant.
Type Parameters ​
| Type Parameter |
|---|
TData |
TValue |
Parameters ​
| Parameter | Type |
|---|---|
accessor | Accessor<TData, TValue> |
Returns ​
(item) => TValue