maybeSeries.js 565 B

1234567891011121314151617
  1. import { deepMix } from '@antv/util';
  2. import { column, columnOf } from './utils/helper';
  3. /**
  4. * Assume color channel is series channel.
  5. */
  6. export const MaybeSeries = () => {
  7. return (I, mark) => {
  8. const { encode } = mark;
  9. const { series, color } = encode;
  10. if (series !== undefined || color === undefined)
  11. return [I, mark];
  12. const [C, fc] = columnOf(encode, 'color');
  13. return [I, deepMix({}, mark, { encode: { series: column(C, fc) } })];
  14. };
  15. };
  16. MaybeSeries.props = {};
  17. //# sourceMappingURL=maybeSeries.js.map