react-plot
Version:
Library of React components to render SVG 2D plots.
8 lines • 417 B
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
import { usePointsPosition } from '../../hooks.js';
export function Polygon(props) {
const { points: oldPoints, color, xAxis = 'x', yAxis = 'y', ...polylineProps } = props;
const points = usePointsPosition({ points: oldPoints, xAxis, yAxis });
return _jsx("polygon", { fill: color, points: points, ...polylineProps });
}
//# sourceMappingURL=Polygon.js.map