UNPKG

igniteui-react-charts

Version:

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

193 lines (190 loc) 6.45 kB
import { __extends } from "tslib"; import { IgrSeries } from "./igr-series"; import { IgrAnnotationLayer } from "./igr-annotation-layer"; import { ItemToolTipLayer } from "./ItemToolTipLayer"; import { ensureBool, brushToString, stringToBrush } from "igniteui-react-core"; /** * Represents an annotation layer that displays tooltips for all target series individually. */ var IgrItemToolTipLayer = /** @class */ /*@__PURE__*/ (function (_super) { __extends(IgrItemToolTipLayer, _super); function IgrItemToolTipLayer(props) { return _super.call(this, props) || this; } IgrItemToolTipLayer.prototype.createImplementation = function () { return new ItemToolTipLayer(); }; Object.defineProperty(IgrItemToolTipLayer.prototype, "i", { /** * @hidden */ get: function () { return this._implementation; }, enumerable: false, configurable: true }); Object.defineProperty(IgrItemToolTipLayer.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(IgrItemToolTipLayer.prototype, "isToolTipLayer", { get: function () { return this.i.f7; }, enumerable: false, configurable: true }); Object.defineProperty(IgrItemToolTipLayer.prototype, "isDefaultTooltipBehaviorDisabled", { /** * Gets whether the default tooltip behaviors for the chart are disabled if this layer is present. */ get: function () { return this.i.e5; }, enumerable: false, configurable: true }); Object.defineProperty(IgrItemToolTipLayer.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.aa0; }, set: function (v) { this.i.aa0 = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrItemToolTipLayer.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.aat; 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.aat = null : this.i.aat = v.i; }, enumerable: false, configurable: true }); Object.defineProperty(IgrItemToolTipLayer.prototype, "useInterpolation", { /** * Gets or sets whether to use value interpolation when drawing the tooltips. */ get: function () { return this.i.aaw; }, set: function (v) { this.i.aaw = ensureBool(v); }, enumerable: false, configurable: true }); Object.defineProperty(IgrItemToolTipLayer.prototype, "skipUnknownValues", { /** * Gets or sets whether to skip past unknown values when searching for series values. */ get: function () { return this.i.aav; }, set: function (v) { this.i.aav = ensureBool(v); }, enumerable: false, configurable: true }); Object.defineProperty(IgrItemToolTipLayer.prototype, "toolTipBackground", { /** * Gets or sets the background of the tooltip containers. */ get: function () { return brushToString(this.i.abg); }, set: function (v) { this.i.abg = stringToBrush(v); }, enumerable: false, configurable: true }); Object.defineProperty(IgrItemToolTipLayer.prototype, "toolTipBorderBrush", { /** * Gets or sets the border color of the tooltip containers. */ get: function () { return brushToString(this.i.abh); }, set: function (v) { this.i.abh = stringToBrush(v); }, enumerable: false, configurable: true }); Object.defineProperty(IgrItemToolTipLayer.prototype, "toolTipBorderThickness", { /** * Gets or sets the border thickness of the tooltip containers. */ get: function () { return this.i.aax; }, set: function (v) { this.i.aax = +v; }, enumerable: false, configurable: true }); IgrItemToolTipLayer.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; }; IgrItemToolTipLayer.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. */ IgrItemToolTipLayer.prototype.hideToolTips = function () { this.i.ql(); }; /** * Hides any tooltips presented by the layer, if any. */ IgrItemToolTipLayer.prototype.hideToolTipsImmediate = function () { this.i.qm(); }; return IgrItemToolTipLayer; }(IgrAnnotationLayer)); export { IgrItemToolTipLayer };