UNPKG

igniteui-angular-charts

Version:

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

304 lines (303 loc) 10.3 kB
import { IgxSeriesComponent } from "./igx-series-component"; import { CalloutAnnotation as CalloutAnnotation_internal } from "./CalloutAnnotation"; import { brushToString, stringToBrush } from "igniteui-angular-core"; /** * Represents a callout annotation */ var IgxCalloutAnnotation = /** @class */ /*@__PURE__*/ (function () { function IgxCalloutAnnotation() { this._zoneRunner = null; this._implementation = this.createImplementation(); this._implementation.externalObject = this; this.onImplementationCreated(); if (this._initializeAdapters) { this._initializeAdapters(); } } IgxCalloutAnnotation.prototype.createImplementation = function () { return new CalloutAnnotation_internal(); }; Object.defineProperty(IgxCalloutAnnotation.prototype, "i", { /** * @hidden */ get: function () { return this._implementation; }, enumerable: false, configurable: true }); IgxCalloutAnnotation.prototype.onImplementationCreated = function () { }; IgxCalloutAnnotation.prototype._provideImplementation = function (i) { this._implementation = i; this._implementation.externalObject = this; this.onImplementationCreated(); }; Object.defineProperty(IgxCalloutAnnotation.prototype, "xValue", { /** * Gets or sets the XValue at which this annotation is displayed on the axis. */ get: function () { return this.i.xValue; }, set: function (v) { this.i.xValue = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgxCalloutAnnotation.prototype, "yValue", { /** * Gets or sets the YValue at which this annotation is displayed on the axis. */ get: function () { return this.i.yValue; }, set: function (v) { this.i.yValue = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgxCalloutAnnotation.prototype, "text", { /** * Gets or sets the text that should be displayed for the annotation. Leave null to display the value automatically. */ get: function () { return this.i.text; }, set: function (v) { this.i.text = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgxCalloutAnnotation.prototype, "key", { /** * Gets or sets the Key that should be annotated. */ get: function () { return this.i.key; }, set: function (v) { this.i.key = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgxCalloutAnnotation.prototype, "content", { /** * Gets or sets the Content that should be annotated. */ get: function () { return this.i.content; }, set: function (v) { this.i.content = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgxCalloutAnnotation.prototype, "series", { /** * Gets or sets the series to which the callout pertains to. Leave unset for an automatic value. */ get: function () { var r = this.i.series; 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.series = null : this.i.series = v.i; }, enumerable: false, configurable: true }); Object.defineProperty(IgxCalloutAnnotation.prototype, "itemColor", { /** * Gets or sets the ItemColor to which the callout pertains to. Leave unset for an automatic value. */ get: function () { return brushToString(this.i.itemColor); }, set: function (v) { this.i.itemColor = stringToBrush(v); }, enumerable: false, configurable: true }); Object.defineProperty(IgxCalloutAnnotation.prototype, "formatLabel", { /** * Sets or gets a function which takes an object that produces a formatted label for the value of this annotation. */ get: function () { return this.i.formatLabel; }, set: function (v) { this.i.formatLabel = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgxCalloutAnnotation.prototype, "textColor", { /** * Gets or sets the color to use for the text in the annotation. */ get: function () { return brushToString(this.i.textColor); }, set: function (v) { this.i.textColor = stringToBrush(v); }, enumerable: false, configurable: true }); Object.defineProperty(IgxCalloutAnnotation.prototype, "background", { /** * Gets or sets the background to use for tha axis annotation box. */ get: function () { return brushToString(this.i.background); }, set: function (v) { this.i.background = stringToBrush(v); }, enumerable: false, configurable: true }); Object.defineProperty(IgxCalloutAnnotation.prototype, "outline", { /** * Gets or sets the Outline to use for tha axis annotation box. */ get: function () { return brushToString(this.i.outline); }, set: function (v) { this.i.outline = stringToBrush(v); }, enumerable: false, configurable: true }); Object.defineProperty(IgxCalloutAnnotation.prototype, "leaderBrush", { /** * Gets or sets the LeaderBrush to use for tha axis annotation box. */ get: function () { return brushToString(this.i.leaderBrush); }, set: function (v) { this.i.leaderBrush = stringToBrush(v); }, enumerable: false, configurable: true }); Object.defineProperty(IgxCalloutAnnotation.prototype, "strokeThickness", { /** * Gets or sets the border stroke thickness to use for tha axis annotation box. */ get: function () { return this.i.strokeThickness; }, set: function (v) { this.i.strokeThickness = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgxCalloutAnnotation.prototype, "backgroundPaddingLeft", { /** * Gets or sets the padding to use withing the axis annotation callout. Leaving this NaN will use an automatic value related to the axis label margins. */ get: function () { return this.i.backgroundPaddingLeft; }, set: function (v) { this.i.backgroundPaddingLeft = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgxCalloutAnnotation.prototype, "backgroundPaddingTop", { /** * Gets or sets the padding to use withing the axis annotation callout. Leaving this NaN will use an automatic value related to the axis label margins. */ get: function () { return this.i.backgroundPaddingTop; }, set: function (v) { this.i.backgroundPaddingTop = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgxCalloutAnnotation.prototype, "backgroundPaddingRight", { /** * Gets or sets the padding to use withing the axis annotation callout. Leaving this NaN will use an automatic value related to the axis label margins. */ get: function () { return this.i.backgroundPaddingRight; }, set: function (v) { this.i.backgroundPaddingRight = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgxCalloutAnnotation.prototype, "backgroundPaddingBottom", { /** * Gets or sets the padding to use withing the axis annotation callout. Leaving this NaN will use an automatic value related to the axis label margins. */ get: function () { return this.i.backgroundPaddingBottom; }, set: function (v) { this.i.backgroundPaddingBottom = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgxCalloutAnnotation.prototype, "backgroundCornerRadius", { /** * Gets or sets the corner radius to use for the callout borders. */ get: function () { return this.i.backgroundCornerRadius; }, set: function (v) { this.i.backgroundCornerRadius = +v; }, enumerable: false, configurable: true }); IgxCalloutAnnotation.prototype.findByName = function (name) { if (this.findEphemera) { if (name && name.indexOf("@@e:") == 0) { return this.findEphemera(name); } } if (this.series && this.series.name && this.series.name == name) { return this.series; } return null; }; IgxCalloutAnnotation.prototype._runInZone = function (act) { if (this._zoneRunner != null) { this._zoneRunner(act); } else { act(); } }; return IgxCalloutAnnotation; }()); export { IgxCalloutAnnotation };