UNPKG

react-plot

Version:

Library of React components to render SVG 2D plots.

16 lines 673 B
import { jsx as _jsx } from "react/jsx-runtime"; import { useDirectedEllipsePosition } from '../../hooks.js'; export function DirectedEllipse(props) { const { x1, y1, y2, x2, color, width, style, xAxis = 'x', yAxis = 'y', ...otherProps } = props; const { cx, cy, rx, ry, rotation } = useDirectedEllipsePosition({ x1, y1, y2, x2, width, xAxis, yAxis, }); return (_jsx("ellipse", { cx: cx, cy: cy, rx: rx, ry: ry, transform: `rotate(${rotation} 0 0)`, style: { ...style, transformOrigin: 'center', transformBox: 'fill-box' }, fill: color, ...otherProps })); } //# sourceMappingURL=DirectedEllipse.js.map