UNPKG

@antv/g2plot

Version:

G2 Plot, a market of plots built with the Grammar of Graphics'

44 lines 1.48 kB
import { __extends } from "tslib"; import * as _ from '@antv/util'; import { registerPlotType } from '../../base/global'; import '../scatter/components/label/scatter-label'; import * as EventParser from '../scatter/event'; import ScatterLayer from '../scatter/layer'; var BubbleLayer = /** @class */ (function (_super) { __extends(BubbleLayer, _super); function BubbleLayer() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = 'bubble'; return _this; } BubbleLayer.getDefaultOptions = function () { return _.deepMix({}, _super.getDefaultOptions.call(this), { pointSize: [8, 58], pointStyle: { strokeOpacity: 1, fillOpacity: 1, opacity: 0.5, }, label: { position: 'middle', }, }); }; BubbleLayer.prototype.legend = function () { var _a; _super.prototype.legend.call(this); /** 取消气泡大小图例 */ this.setConfig('legends', { fields: (_a = {}, _a[this.options.sizeField] = false, _a), }); }; BubbleLayer.prototype.parseEvents = function () { _super.prototype.parseEvents.call(this, EventParser); }; return BubbleLayer; }(ScatterLayer)); export default BubbleLayer; registerPlotType('bubble', BubbleLayer); //# sourceMappingURL=layer.js.map