UNPKG

881 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.MaybeGradient = 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 MaybeGradient = () => {
11 return (I, mark) => {
12 const { style = {}, encode } = mark;
13 const { series } = encode;
14 const { gradient } = style;
15 if (!gradient || series)
16 return [I, mark];
17 return [
18 I,
19 (0, util_1.deepMix)({}, mark, {
20 encode: {
21 series: (0, helper_1.visualColumn)((0, helper_1.constant)(I, undefined)),
22 },
23 }),
24 ];
25 };
26};
27exports.MaybeGradient = MaybeGradient;
28exports.MaybeGradient.props = {};
29//# sourceMappingURL=maybeGradient.js.map
\No newline at end of file