When temporal columns are used in pivot table Rows/Columns, Date objects
can reach convertToNumberIfNumeric at runtime despite the string[] type
declaration (due to any-typed boundaries in the data pipeline). Calling
.trim() on a Date object throws TypeError: t.trim is not a function,
crashing the chart entirely.
Widen the parameter type to unknown and add a type guard that returns
non-string values unchanged, letting the date formatter receive them
directly. Also update makeColPivotSettings test helper to accept unknown
and add regression tests for the Date object passthrough paths.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>