UNPKG

igniteui-angular-charts

Version:

Ignite UI Angular charting components for building rich data visualizations for modern web apps.

122 lines (121 loc) 4.39 kB
import { __extends } from "tslib"; import { IgxSeriesComponent } from "./igx-series-component"; import { IgxSeriesMatcher } from "./igx-series-matcher"; import { IgxUserBaseAnnotation } from "./igx-user-base-annotation"; import { UserPointAnnotation as UserPointAnnotation_internal } from "./UserPointAnnotation"; /** * Represents an user annotation for rendering data point annotation on a series */ var IgxUserPointAnnotation = /** @class */ /*@__PURE__*/ (function (_super) { __extends(IgxUserPointAnnotation, _super); function IgxUserPointAnnotation() { return _super.call(this) || this; } IgxUserPointAnnotation.prototype.createImplementation = function () { return new UserPointAnnotation_internal(); }; Object.defineProperty(IgxUserPointAnnotation.prototype, "i", { /** * @hidden */ get: function () { return this._implementation; }, enumerable: false, configurable: true }); Object.defineProperty(IgxUserPointAnnotation.prototype, "targetSeries", { /** * Gets or sets the target series that will display the annotation. */ get: function () { var r = this.i.targetSeries; if (r == null) { return null; } if (!r.externalObject) { var e = IgxSeriesComponent._createFromInternal(r); if (e) { e._implementation = r; } r.externalObject = e; } return r.externalObject; }, set: function (v) { v == null ? this.i.targetSeries = null : this.i.targetSeries = v.i; }, enumerable: false, configurable: true }); Object.defineProperty(IgxUserPointAnnotation.prototype, "targetSeriesMatcher", { /** * Gets or sets a matcher for matching a series that will display the annotation. */ get: function () { var r = this.i.targetSeriesMatcher; if (r == null) { return null; } if (!r.externalObject) { var e = new IgxSeriesMatcher(); if (r.$type) { e._implementation = r; } else { if (e.i.setNativeElement) { e.i.setNativeElement(r); } } r.externalObject = e; } return r.externalObject; }, set: function (v) { v == null ? this.i.targetSeriesMatcher = null : this.i.targetSeriesMatcher = v.i; }, enumerable: false, configurable: true }); Object.defineProperty(IgxUserPointAnnotation.prototype, "xValue", { /** * Gets or sets the value that determines location of the annotation in the coordinates of x-axis. */ get: function () { return this.i.xValue; }, set: function (v) { this.i.xValue = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgxUserPointAnnotation.prototype, "yValue", { /** * Gets or sets the value that determines location of the annotation in the coordinates of y-axis. */ get: function () { return this.i.yValue; }, set: function (v) { this.i.yValue = +v; }, enumerable: false, configurable: true }); IgxUserPointAnnotation.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; } if (this.targetSeriesMatcher && this.targetSeriesMatcher.name && this.targetSeriesMatcher.name == name) { return this.targetSeriesMatcher; } return null; }; return IgxUserPointAnnotation; }(IgxUserBaseAnnotation)); export { IgxUserPointAnnotation };