UNPKG

react-plot

Version:

Library of React components to render SVG 2D plots.

15 lines 522 B
import { jsx as _jsx } from "react/jsx-runtime"; import { useEllipsePosition } from '../../hooks.js'; export function Ellipse(props) { const { x, y, rx: oldRx, ry: oldRy, color, xAxis = 'x', yAxis = 'y', ...otherProps } = props; const { cx, cy, rx, ry } = useEllipsePosition({ cx: x, cy: y, rx: oldRx, ry: oldRy, xAxis, yAxis, }); return (_jsx("ellipse", { cx: cx, cy: cy, rx: rx, ry: ry, fill: color, ...otherProps })); } //# sourceMappingURL=Ellipse.js.map