react-plot
Version:
Library of React components to render SVG 2D plots.
15 lines • 492 B
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
import { useEllipsePosition } from '../../hooks.js';
export function Circle(props) {
const { x, y, r: oldR, color, xAxis = 'x', yAxis = 'y', ...otherProps } = props;
const { cx, cy, rx: r, } = useEllipsePosition({
cx: x,
cy: y,
rx: oldR,
ry: oldR,
xAxis,
yAxis,
});
return _jsx("circle", { cx: cx, cy: cy, r: r, fill: color, ...otherProps });
}
//# sourceMappingURL=Circle.js.map