source: node_modules/recharts/es6/shape/Dot.js

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

Added visualizations

  • Property mode set to 100644
File size: 1.2 KB
Line 
1function _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); }
2import * as React from 'react';
3import { clsx } from 'clsx';
4import { adaptEventHandlers } from '../util/types';
5import { svgPropertiesNoEvents } from '../util/svgPropertiesNoEvents';
6import { isNumber } from '../util/DataUtils';
7/**
8 * Renders a dot in the chart.
9 *
10 * This component accepts X and Y coordinates in pixels.
11 * If you need to position the rectangle based on your chart's data,
12 * consider using the {@link ReferenceDot} component instead.
13 *
14 * @param props
15 * @constructor
16 */
17export var Dot = props => {
18 var {
19 cx,
20 cy,
21 r,
22 className
23 } = props;
24 var layerClass = clsx('recharts-dot', className);
25 if (isNumber(cx) && isNumber(cy) && isNumber(r)) {
26 return /*#__PURE__*/React.createElement("circle", _extends({}, svgPropertiesNoEvents(props), adaptEventHandlers(props), {
27 className: layerClass,
28 cx: cx,
29 cy: cy,
30 r: r
31 }));
32 }
33 return null;
34};
Note: See TracBrowser for help on using the repository browser.