import React from 'react'; import { svgCoordinate } from '../../utilities'; import { LineProps } from './types'; const Line: React.FC = ({ transform, data, domain, onClick, onMouseOver, onMouseOut, ...props }) => { if (transform === undefined) throw new Error("Line component must receive a transform prop. Did you render one outside a ?"); return data.length >= 1 ? ( svgCoordinate(transform(x))).join(" L ")}`} fill="none" {...props} /> ) : null }; export default Line;