import React from 'react'; import { Text, View } from 'react-native'; import { chartLabel } from '../chart-styles'; type Axis = 'RIGHT' | 'LEFT' interface YLabel { axis: Axis; displayName: string; color: string; } type ChartLabelProps = { title: string; yLabels: Array; }; const renderLabels = (yLabels: Array) => { return yLabels.map((label) => ( {label.displayName} )); }; export default function ChartLabel({ title, yLabels }: ChartLabelProps) { return ( {title} {renderLabels(yLabels)} ); }