UNPKG

react-plot

Version:

Library of React components to render SVG 2D plots.

7 lines 995 B
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { legendOffsetContext } from '../../contexts/legendOffsetContext.js'; export default function AnnotationsTrackingLayer(props) { const { width, height, svgStyle, svgId, svgClassName, topOffset, leftOffset, legendOffset, legend, legendRef, plotId, annotations, tracking, } = props; return (_jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: width, height: height, style: svgStyle, id: svgId ? `${svgId}-annotations` : undefined, className: svgClassName, children: [_jsxs("g", { transform: `translate(${leftOffset}, ${topOffset})`, children: [_jsx("g", { style: { clipPath: `url(#seriesViewportClip-${plotId})` }, children: annotations }), tracking] }), _jsx("g", { transform: `translate(${leftOffset}, ${topOffset})`, children: _jsx(legendOffsetContext.Provider, { value: legendOffset, children: _jsx("g", { ref: legendRef, children: legend }) }) })] })); } //# sourceMappingURL=AnnotationsTrackingLayer.js.map