source: node_modules/recharts/es6/container/Surface.js@ a762898

Last change on this file since a762898 was a762898, checked in by istevanoska <ilinastevanoska@…>, 6 months ago

Added visualizations

  • Property mode set to 100644
File size: 2.1 KB
RevLine 
[a762898]1var _excluded = ["children", "width", "height", "viewBox", "className", "style", "title", "desc"];
2function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
4function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
5import * as React from 'react';
6import { forwardRef } from 'react';
7import { clsx } from 'clsx';
8import { svgPropertiesAndEvents } from '../util/svgPropertiesAndEvents';
9/**
10 * Renders an SVG element.
11 *
12 * All charts already include a Surface component, so you would not normally use this directly.
13 *
14 * @link https://developer.mozilla.org/en-US/docs/Web/SVG/Element/svg
15 */
16export var Surface = /*#__PURE__*/forwardRef((props, ref) => {
17 var {
18 children,
19 width,
20 height,
21 viewBox,
22 className,
23 style,
24 title,
25 desc
26 } = props,
27 others = _objectWithoutProperties(props, _excluded);
28 var svgView = viewBox || {
29 width,
30 height,
31 x: 0,
32 y: 0
33 };
34 var layerClass = clsx('recharts-surface', className);
35 return /*#__PURE__*/React.createElement("svg", _extends({}, svgPropertiesAndEvents(others), {
36 className: layerClass,
37 width: width,
38 height: height,
39 style: style,
40 viewBox: "".concat(svgView.x, " ").concat(svgView.y, " ").concat(svgView.width, " ").concat(svgView.height),
41 ref: ref
42 }), /*#__PURE__*/React.createElement("title", null, title), /*#__PURE__*/React.createElement("desc", null, desc), children);
43});
Note: See TracBrowser for help on using the repository browser.