UNPKG

741 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.MaybeSeries = void 0;
4const util_1 = require("@antv/util");
5const helper_1 = require("./utils/helper");
6/**
7 * Assume color channel is series channel.
8 */
9const MaybeSeries = () => {
10 return (I, mark) => {
11 const { encode } = mark;
12 const { series, color } = encode;
13 if (series !== undefined || color === undefined)
14 return [I, mark];
15 const [C, fc] = (0, helper_1.columnOf)(encode, 'color');
16 return [I, (0, util_1.deepMix)({}, mark, { encode: { series: (0, helper_1.column)(C, fc) } })];
17 };
18};
19exports.MaybeSeries = MaybeSeries;
20exports.MaybeSeries.props = {};
21//# sourceMappingURL=maybeSeries.js.map
\No newline at end of file