UNPKG

@antv/g2plot

Version:

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

22 lines 928 B
import { __extends } from "tslib"; import { registerElementLabels } from '@antv/g2'; import { ColumnLabels } from '../../../column/component/label/column-label'; var StackColumnLabels = /** @class */ (function (_super) { __extends(StackColumnLabels, _super); function StackColumnLabels() { return _super !== null && _super.apply(this, arguments) || this; } StackColumnLabels.prototype.adjustPosition = function (label, shape) { var labelRange = label.getBBox(); var shapeRange = shape.getBBox(); if (shapeRange.height <= labelRange.height) { label.attr('opacity', 0); label.attr('fillOpacity', 0); label.attr('strokeOpacity', 0); label.set('capture', false); } }; return StackColumnLabels; }(ColumnLabels)); registerElementLabels('stackColumnLabel', StackColumnLabels); //# sourceMappingURL=stack-column-label.js.map