@antv/g2
Version:
the Grammar of Graphics in Javascript
32 lines • 1.06 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var base_1 = tslib_1.__importDefault(require("./base"));
/** 引入 Point 对应的 ShapeFactory */
require("./shape/point");
/**
* Point 几何标记。
* 常用于绘制点图。
*/
var Point = /** @class */ (function (_super) {
tslib_1.__extends(Point, _super);
function Point() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.type = 'point';
_this.shapeType = 'point';
_this.generatePoints = true;
return _this;
}
/**
* 获取一个点的绘制信息。
* @param mappingDatum
* @returns draw cfg
*/
Point.prototype.getDrawCfg = function (mappingDatum) {
var shapeCfg = _super.prototype.getDrawCfg.call(this, mappingDatum);
return tslib_1.__assign(tslib_1.__assign({}, shapeCfg), { isStack: !!this.getAdjust('stack') });
};
return Point;
}(base_1.default));
exports.default = Point;
//# sourceMappingURL=point.js.map