UNPKG

673 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.MaybeTupleY = void 0;
4const util_1 = require("@antv/util");
5const helper_1 = require("./utils/helper");
6/**
7 * Add 3 constant encode for size channel.
8 * This is useful for point geometry.
9 */
10const MaybeTupleY = () => {
11 return (I, mark) => {
12 const { data } = mark;
13 if (!Array.isArray(data) || data.some(helper_1.isObject))
14 return [I, mark];
15 return [I, (0, util_1.deepMix)({}, mark, { encode: { y: (0, helper_1.column)(data) } })];
16 };
17};
18exports.MaybeTupleY = MaybeTupleY;
19exports.MaybeTupleY.props = {};
20//# sourceMappingURL=maybeTupleY.js.map
\No newline at end of file