/** * @fileOverview Polygon */ import React, { PureComponent } from 'react'; import classNames from 'classnames'; import { PresentationAttributes, filterProps, Coordinate } from '../util/types'; const getPolygonPoints = (points: Array) => points .reduce((result, entry) => { if (entry.x === +entry.x && entry.y === +entry.y) { result.push([entry.x, entry.y]); } return result; }, []) .join(' '); interface PolygonProps { className?: string; points?: Array; } type Props = Omit, 'points'> & PolygonProps; class Polygon extends PureComponent { render() { const { points, className } = this.props; if (!points || !points.length) { return null; } const layerClass = classNames('recharts-polygon', className); return ; } } export default Polygon;