line.js 515 B

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