theta.js 684 B

1234567891011121314151617181920212223
  1. import { Polar } from './polar';
  2. import { Transpose } from './transpose';
  3. export const getThetaOptions = (options = {}) => {
  4. const defaultOptions = {
  5. startAngle: -Math.PI / 2,
  6. endAngle: (Math.PI * 3) / 2,
  7. innerRadius: 0,
  8. outerRadius: 1,
  9. };
  10. return Object.assign(Object.assign({}, defaultOptions), options);
  11. };
  12. /**
  13. * Theta = Transpose + Polar.
  14. */
  15. export const Theta = (options) => {
  16. const { startAngle, endAngle, innerRadius, outerRadius } = getThetaOptions(options);
  17. return [
  18. ...Transpose(),
  19. ...Polar({ startAngle, endAngle, innerRadius, outerRadius }),
  20. ];
  21. };
  22. Theta.props = {};
  23. //# sourceMappingURL=theta.js.map