area.js 524 B

1234567891011
  1. import { curveLinearClosed, curveLinear } from 'd3-shape';
  2. import { isPolar } from '../../utils/coordinate';
  3. import { Curve } from './curve';
  4. export const Area = (options) => {
  5. return (P, value, coordinate, theme) => {
  6. const curve = isPolar(coordinate) ? curveLinearClosed : curveLinear;
  7. return Curve(Object.assign({ curve: curve }, options))(P, value, coordinate, theme);
  8. };
  9. };
  10. Area.props = Object.assign(Object.assign({}, Curve.props), { defaultMarker: 'square' });
  11. //# sourceMappingURL=area.js.map