UNPKG

victory-native

Version:

A charting library for React Native with a focus on performance and customization.

15 lines (14 loc) 557 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getXAxisTicks = void 0; const tickHelpers_1 = require("../../utils/tickHelpers"); const getXAxisTicks = ({ isNumericalData, ix, tickCount, tickValues, xScale, }) => { if (tickValues) { return (0, tickHelpers_1.downsampleTicks)(tickValues, tickCount); } if (!isNumericalData) { return (0, tickHelpers_1.downsampleTicks)(ix.map((_, index) => index), tickCount); } return xScale.ticks(tickCount); }; exports.getXAxisTicks = getXAxisTicks;