import React from 'react'; import { G, Line } from 'react-native-svg'; import { ScaleLinear } from 'd3-scale' import { colors } from '../styles'; type scaleFunction = ScaleLinear; interface CustomGridProps { y: scaleFunction; ticks: Array; } export const CustomGrid: React.FC = ({ y, ticks }) => { const [firstTick, ...remainingTicks] = ticks; const dashArray = [1, 3]; const strokeSolidWidth = 0.2; const strokeSolidColor = colors.bgBlack; const strokeDashWidth = 1; const strokeDashColor = colors.lightGrey; const renderLine = (tick: number, stroke: string, strokeWidth: number, dashArray?: number[]) => ( ); return ( {renderLine(firstTick, strokeSolidColor, strokeSolidWidth)} {remainingTicks.map((tick) => renderLine(tick, strokeDashColor, strokeDashWidth, dashArray))} ); };