isRawDatum
Chart
stable
Type guard for the OrigamBoxPlot chart that returns true when a datum carries a raw samples array (unaggregated) rather than pre-computed box-plot statistics (min, q1, median, q3, max).
API
Signature
Full TypeScript signature sourced from the util file.
API
Parameters
Input parameters accepted by this util.
- datumrequiredunknown
- The data point to inspect. A raw datum must be an object with a samples property that is an Array. Pre-aggregated box-plot objects (with min/q1/median/q3/max fields instead) return false.
API
Return value
The value returned by this util.
- true and narrows the type to the raw-datum shape when the datum has a samples array; false for pre-aggregated or unrecognised data.
Usage
Examples
Ready-to-paste usage snippets.
Branching on raw vs pre-aggregated box-plot data