Documentation / @ripl/charts / NumericAccessor
Type Alias: NumericAccessor<TData>
NumericAccessor<
TData> =NumericKey<TData> | ((item) =>number)
Defined in: charts/src/core/data.ts:27
A strongly-typed numeric accessor: a numeric-valued property key of TData, or a function returning a number. Using this (instead of a bare keyof TData) makes the compiler reject a key that points at a non-numeric field. Fields that also accept a fixed constant (e.g. a scatter sizeBy) widen this with | number at the option site.
Type Parameters
| Type Parameter |
|---|
TData |