UNPKG

igniteui-react-charts

Version:

Ignite UI React charting components for building rich data visualizations using TypeScript APIs.

174 lines (171 loc) 6.54 kB
import { __extends } from "tslib"; import { delegateCombine, delegateRemove } from "igniteui-react-core"; import { IgrSeries } from "./igr-series"; import { IgrUserAnnotationToolTipContentUpdatingEventArgs } from "./igr-user-annotation-tool-tip-content-updating-event-args"; import { IgrAnnotationLayer } from "./igr-annotation-layer"; import { UserAnnotationToolTipLayer } from "./UserAnnotationToolTipLayer"; import { ensureBool } from "igniteui-react-core"; /** * Represents an annotation layer that displays tooltips for all target series individually. */ var IgrUserAnnotationToolTipLayer = /** @class */ /*@__PURE__*/ (function (_super) { __extends(IgrUserAnnotationToolTipLayer, _super); function IgrUserAnnotationToolTipLayer(props) { var _this = _super.call(this, props) || this; _this._contentUpdating = null; _this._contentUpdating_wrapped = null; return _this; } IgrUserAnnotationToolTipLayer.prototype.createImplementation = function () { return new UserAnnotationToolTipLayer(); }; Object.defineProperty(IgrUserAnnotationToolTipLayer.prototype, "i", { /** * @hidden */ get: function () { return this._implementation; }, enumerable: false, configurable: true }); Object.defineProperty(IgrUserAnnotationToolTipLayer.prototype, "isAnnotationHoverLayer", { /** * Gets whether the series is an annotation layer displayed only when hovering over the chart. */ get: function () { return this.i.eu; }, enumerable: false, configurable: true }); Object.defineProperty(IgrUserAnnotationToolTipLayer.prototype, "targetSeriesName", { /** * Gets or sets the name of the series series to target this annotation to. If null, this annotation targets all series simultaneously. */ get: function () { return this.i.abh; }, set: function (v) { this.i.abh = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrUserAnnotationToolTipLayer.prototype, "targetSeries", { /** * Gets or sets the series to target this annotation to. If null, this annotation targets all series simultaneously. */ get: function () { var r = this.i.aa2; if (r == null) { return null; } if (!r.externalObject) { var e = IgrSeries._createFromInternal(r); if (e) { e._implementation = r; } r.externalObject = e; } return r.externalObject; }, set: function (v) { if (v != null && this._stylingContainer && v._styling) v._styling(this._stylingContainer, this, this); v == null ? this.i.aa2 = null : this.i.aa2 = v.i; }, enumerable: false, configurable: true }); Object.defineProperty(IgrUserAnnotationToolTipLayer.prototype, "skipUnknownValues", { /** * Gets or sets whether to skip past unknown values when searching for series values. */ get: function () { return this.i.abc; }, set: function (v) { this.i.abc = ensureBool(v); }, enumerable: false, configurable: true }); Object.defineProperty(IgrUserAnnotationToolTipLayer.prototype, "isUserAnnotationToolTipLayer", { get: function () { return this.i.ga; }, enumerable: false, configurable: true }); Object.defineProperty(IgrUserAnnotationToolTipLayer.prototype, "isToolTipLayer", { get: function () { return this.i.f7; }, enumerable: false, configurable: true }); IgrUserAnnotationToolTipLayer.prototype.findByName = function (name) { var baseResult = _super.prototype.findByName.call(this, name); if (baseResult) { return baseResult; } if (this.targetSeries && this.targetSeries.name && this.targetSeries.name == name) { return this.targetSeries; } return null; }; IgrUserAnnotationToolTipLayer.prototype._styling = function (container, component, parent) { _super.prototype._styling.call(this, container, component, parent); this._inStyling = true; if (this.targetSeries && this.targetSeries._styling) { this.targetSeries._styling(container, component, this); } this._inStyling = false; }; /** * Hides any tooltips presented by the layer, if any. */ IgrUserAnnotationToolTipLayer.prototype.hideToolTips = function () { this.i.ql(); }; /** * Hides any tooltips presented by the layer, if any. */ IgrUserAnnotationToolTipLayer.prototype.hideToolTipsImmediate = function () { this.i.qm(); }; Object.defineProperty(IgrUserAnnotationToolTipLayer.prototype, "contentUpdating", { /** * Called when the content is being created or updated. */ get: function () { return this._contentUpdating; }, set: function (ev) { var _this = this; if (this._contentUpdating_wrapped !== null) { this.i.contentUpdating = delegateRemove(this.i.contentUpdating, this._contentUpdating_wrapped); this._contentUpdating_wrapped = null; this._contentUpdating = null; } this._contentUpdating = ev; this._contentUpdating_wrapped = function (o, e) { var outerArgs = new IgrUserAnnotationToolTipContentUpdatingEventArgs(); outerArgs._provideImplementation(e); if (_this.beforeContentUpdating) { _this.beforeContentUpdating(_this, outerArgs); } if (_this._contentUpdating) { _this._contentUpdating(_this, outerArgs); } }; this.i.contentUpdating = delegateCombine(this.i.contentUpdating, this._contentUpdating_wrapped); ; }, enumerable: false, configurable: true }); return IgrUserAnnotationToolTipLayer; }(IgrAnnotationLayer)); export { IgrUserAnnotationToolTipLayer };