MCPcopy Index your code
hub / github.com/tinyplex/tinybase / getAxisTicks

Function getAxisTicks

src/ui-react-dom-charts/components/CartesianChart.tsx:514–529  ·  view source on GitHub ↗
(
  ticks: readonly TimeValue[],
  xScale: XScale = LINEAR,
  timestampUnit: TimestampUnit = MILLISECOND,
)

Source from the content-addressed store, hash-verified

512): number | undefined => (isFiniteNumber(value) ? value : bound);
513
514const getAxisTicks = (
515 ticks: readonly TimeValue[],
516 xScale: XScale = LINEAR,
517 timestampUnit: TimestampUnit = MILLISECOND,
518): Ticks =>
519 arraySort(
520 arrayFilter(
521 arrayMap([...ticks], (tick) =>
522 xScale == TIME ? normalizeTimeValue(tick, timestampUnit) : tick,
523 ),
524 (tick): tick is number => isFiniteNumber(tick),
525 ),
526 (tick1, tick2) => {
527 return tick1 - tick2;
528 },
529 );
530
531const getParsedChildren = (children: ReactNode): ParsedChildren => {
532 const chartChildren: ReactNode[] = [];

Callers 1

CartesianChartFunction · 0.70

Calls 4

arraySortFunction · 0.90
arrayFilterFunction · 0.90
arrayMapFunction · 0.90
normalizeTimeValueFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…