UNPKG

1.79 kBJavaScriptView Raw
1"use strict";
2var __rest = (this && this.__rest) || function (s, e) {
3 var t = {};
4 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5 t[p] = s[p];
6 if (s != null && typeof Object.getOwnPropertySymbols === "function")
7 for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8 if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9 t[p[i]] = s[p[i]];
10 }
11 return t;
12};
13var __importDefault = (this && this.__importDefault) || function (mod) {
14 return (mod && mod.__esModule) ? mod : { "default": mod };
15};
16Object.defineProperty(exports, "__esModule", { value: true });
17exports.polyfill = void 0;
18require("react");
19var column_1 = require("@antv/g2plot/lib/plots/column");
20var polyfill_1 = require("./core/polyfill");
21var createPlot_1 = __importDefault(require("../createPlot"));
22var util_1 = require("@antv/util");
23var REPLACEAPILIST = [{
24 sourceKey: 'colorField',
25 targetKey: 'seriesField',
26 notice: 'colorField 是 g2@1.0的属性,即将废弃,请使用seriesField替代',
27 }, {
28 sourceKey: 'stackField',
29 targetKey: 'seriesField',
30 notice: 'colorField是旧版API,即将废弃 请使用seriesField替代',
31 }];
32exports.polyfill = function (props) {
33 var _a = polyfill_1.polyfillOptions(props), columnSize = _a.columnSize, options = __rest(_a, ["columnSize"]);
34 polyfill_1.replaceApi(REPLACEAPILIST, options);
35 if (!util_1.isNil(columnSize)) {
36 options.minColumnWidth = columnSize;
37 options.maxColumnWidth = columnSize;
38 }
39 return options;
40};
41exports.default = createPlot_1.default(column_1.Column, 'ColumnChart', exports.polyfill);
42//# sourceMappingURL=ColumnChart.js.map
\No newline at end of file