UNPKG

react-plot

Version:

Library of React components to render SVG 2D plots.

5 lines 872 B
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; export default function MarkerDefs({ color, id, width = 6, }) { return (_jsxs("defs", { children: [_jsx("marker", { id: `marker-triangle-${id}`, viewBox: "0 0 10 10", refX: "5", refY: "5", markerWidth: width, markerHeight: width, orient: "auto-start-reverse", children: _jsx("path", { fill: color, d: "M 0 0 L 10 5 L 0 10 z" }) }), _jsx("marker", { id: `marker-circle-${id}`, viewBox: "0 0 10 10", refX: "5", refY: "5", markerWidth: width, markerHeight: width, children: _jsx("circle", { cx: "5", cy: "5", r: "5", fill: color }) }), _jsx("marker", { id: `marker-line-${id}`, viewBox: "0 0 10 10", refX: "5", refY: "5", markerWidth: width, markerHeight: width, orient: "auto", children: _jsx("line", { x1: "5", x2: "5", y1: "0", y2: "10", stroke: color }) })] })); } //# sourceMappingURL=MarkerDefs.js.map