react-plot
Version:
Library of React components to render SVG 2D plots.
7 lines • 465 B
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
import { AlignGroup } from 'react-d3-utils';
export default function HorizontalAxisLabel(props) {
const { plotWidth, label, labelStyle, verticalAlign } = props;
return (_jsx(AlignGroup, { x: plotWidth / 2, y: 0, horizontalAlign: "middle", verticalAlign: verticalAlign, children: _jsx("text", { textAnchor: "middle", style: labelStyle, children: label }) }));
}
//# sourceMappingURL=HorizontalAxisLabel.js.map