%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home2/rezakur1/ai.rezakurnia.com/zh-router-frontend/node_modules/recharts/lib/shape/
Upload File :
Create Path :
Current File : /home2/rezakur1/ai.rezakurnia.com/zh-router-frontend/node_modules/recharts/lib/shape/Dot.js

"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.Dot = void 0;
var React = _interopRequireWildcard(require("react"));
var _clsx = require("clsx");
var _fillDefinitions = require("../fill/fillDefinitions");
var _types = require("../util/types");
var _svgPropertiesNoEvents = require("../util/svgPropertiesNoEvents");
var _DataUtils = require("../util/DataUtils");
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
function _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); }
/**
 * @public
 */

/**
 * The props of the inner renderer, which gets the `fill` as a color or a `url(#…)` reference.
 */

var DotImpl = props => {
  var cx = props.cx,
    cy = props.cy,
    r = props.r,
    className = props.className;
  var layerClass = (0, _clsx.clsx)('recharts-dot', className);
  if ((0, _DataUtils.isNumber)(cx) && (0, _DataUtils.isNumber)(cy) && (0, _DataUtils.isNumber)(r)) {
    return /*#__PURE__*/React.createElement("circle", _extends({}, (0, _svgPropertiesNoEvents.svgPropertiesNoEvents)(props), (0, _types.adaptEventHandlers)(props), {
      className: layerClass,
      cx: cx,
      cy: cy,
      r: r
    }));
  }
  return null;
};

/**
 * Renders a dot in the chart.
 *
 * This component accepts X and Y coordinates in pixels.
 * If you need to position the rectangle based on your chart's data,
 * consider using the {@link ReferenceDot} component instead.
 *
 * @param props
 * @constructor
 * @public
 */
var Dot = props => {
  var fill = props.fill;
  // spreading all props first keeps `fill` in its place among the attributes
  return fill != null && typeof fill === 'object' ? /*#__PURE__*/React.createElement(_fillDefinitions.FillObjectPaint, {
    fill: fill,
    bounds: (0, _fillDefinitions.getShapeBounds)(2 * Number(props.r), 2 * Number(props.r))
  }, paint => /*#__PURE__*/React.createElement(DotImpl, _extends({}, props, {
    fill: paint
  }))) : /*#__PURE__*/React.createElement(DotImpl, _extends({}, props, {
    fill: fill
  }));
};
exports.Dot = Dot;

Zerion Mini Shell 1.0