maybeZeroY1.js 562 B

123456789101112131415161718192021
  1. import { deepMix } from '@antv/util';
  2. import { inferredColumn, constant } from './utils/helper';
  3. /**
  4. * Add zero constant encode for y1 channel.
  5. */
  6. export const MaybeZeroY1 = () => {
  7. return (I, mark) => {
  8. const { encode } = mark;
  9. const { y1 } = encode;
  10. if (y1 !== undefined)
  11. return [I, mark];
  12. return [
  13. I,
  14. deepMix({}, mark, {
  15. encode: { y1: inferredColumn(constant(I, 0)) },
  16. }),
  17. ];
  18. };
  19. };
  20. MaybeZeroY1.props = {};
  21. //# sourceMappingURL=maybeZeroY1.js.map