// @flow import React from 'react'; import _ from 'lodash'; import type {TickScale} from './types'; type RadarRingsProps = { ticks: Array, scale: TickScale, color: string, format(number): string, style?: {}, }; const defaultRadarRingsStyle = { fontFamily: 'sans-serif', fontSize: 10, ringOpacity: 0.1, textFill: 'black', }; export default function RadarRings(props: RadarRingsProps) { const {ticks, scale, color, format, style} = props; const {fontFamily, fontSize, ringOpacity, textFill} = { ...defaultRadarRingsStyle, ...style, }; const outerFirst = _.reverse(ticks); return ( {outerFirst.map(tickValue => { return ( ); })} {outerFirst.map(tickValue => { return ( {format(tickValue)} ); })} ); }