| 123456789101112131415161718192021222324252627 |
- "use strict";
- 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;
- };
- Object.defineProperty(exports, "__esModule", { value: true });
- exports.Smooth = void 0;
- const d3_shape_1 = require("d3-shape");
- const coordinate_1 = require("../../utils/coordinate");
- const curve_1 = require("./curve");
- const Smooth = (options) => {
- const { alpha = 0.5 } = options, rest = __rest(options, ["alpha"]);
- return (P, value, coordinate, theme) => {
- const curve = (0, coordinate_1.isPolar)(coordinate) ? d3_shape_1.curveCatmullRomClosed : d3_shape_1.curveCatmullRom;
- return (0, curve_1.Curve)(Object.assign({ curve: curve.alpha(alpha) }, rest))(P, value, coordinate, theme);
- };
- };
- exports.Smooth = Smooth;
- exports.Smooth.props = Object.assign(Object.assign({}, curve_1.Curve.props), { defaultMarker: 'smooth' });
- //# sourceMappingURL=smooth.js.map
|