1234567891011121314151617181920212223 |
- var __rest = (this && this.__rest) || function (s, e) {
- var t = {};
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
- t[p] = s[p];
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
- t[p[i]] = s[p[i]];
- }
- return t;
- };
- import { curveCatmullRom, curveCatmullRomClosed } from 'd3-shape';
- import { isPolar } from '../../utils/coordinate';
- import { Curve } from './curve';
- export const Smooth = (options) => {
- const { alpha = 0.5 } = options, rest = __rest(options, ["alpha"]);
- return (P, value, coordinate, theme) => {
- const curve = isPolar(coordinate) ? curveCatmullRomClosed : curveCatmullRom;
- return Curve(Object.assign({ curve: curve.alpha(alpha) }, rest))(P, value, coordinate, theme);
- };
- };
- Smooth.props = Object.assign(Object.assign({}, Curve.props), { defaultMarker: 'smooth' });
- //# sourceMappingURL=smooth.js.map
|