import React, { useMemo } from "react"; import { scaleLinear } from "d3-scale"; export const AxisV0 = () => { const ticks = useMemo(() => { const xScale = scaleLinear().domain([0, 100]).range([10, 290]); return xScale.ticks().map((value) => ({ value, xOffset: xScale(value), })); }, []); return ( {ticks.map(({ value, xOffset }) => ( {value} ))} ); };