UNPKG

igniteui-react-charts

Version:

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

371 lines (370 loc) 12.3 kB
import { AxisAnnotation as AxisAnnotation_internal } from "./AxisAnnotation"; import { brushToString, stringToBrush, ensureBool, arrayFindByName } from "igniteui-react-core"; /** * Represents an axis annotation */ var IgrAxisAnnotation = /** @class */ /*@__PURE__*/ (function () { function IgrAxisAnnotation() { this.mounted = false; this._implementation = this.createImplementation(); this._implementation.externalObject = this; this.onImplementationCreated(); if (this._initializeAdapters) { this._initializeAdapters(); } } IgrAxisAnnotation.prototype.createImplementation = function () { return new AxisAnnotation_internal(); }; Object.defineProperty(IgrAxisAnnotation.prototype, "nativeElement", { get: function () { return this._implementation.nativeElement; }, enumerable: false, configurable: true }); Object.defineProperty(IgrAxisAnnotation.prototype, "i", { /** * @hidden */ get: function () { return this._implementation; }, enumerable: false, configurable: true }); IgrAxisAnnotation.prototype.onImplementationCreated = function () { }; IgrAxisAnnotation.prototype._provideImplementation = function (i) { this._implementation = i; this._implementation.externalObject = this; this.onImplementationCreated(); if (this._initializeAdapters) { this._initializeAdapters(); } }; Object.defineProperty(IgrAxisAnnotation.prototype, "value", { /** * Gets or sets the value at which this annotation is displayed on the axis. */ get: function () { return this.i.value; }, set: function (v) { this.i.value = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrAxisAnnotation.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(IgrAxisAnnotation.prototype, "backgroundCornerRadius", { /** * Gets or sets the corner radius to use for the axis annotation borders. */ get: function () { return this.i.backgroundCornerRadius; }, set: function (v) { this.i.backgroundCornerRadius = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrAxisAnnotation.prototype, "labelFormat", { /** * Gets or sets the label format string to use for the label. */ get: function () { return this.i.labelFormat; }, set: function (v) { this.i.labelFormat = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrAxisAnnotation.prototype, "labelFormatSpecifiers", { /** * Gets or sets the format specifiers to use with the LabelFormat string. */ get: function () { return this.i.labelFormatSpecifiers; }, set: function (v) { if (v && !Array.isArray(v) && typeof (v) == "string") { var re = /\s*(?:,|\s|$)\s*/gm; v = v.split(re); } this.i.labelFormatSpecifiers = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrAxisAnnotation.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(IgrAxisAnnotation.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(IgrAxisAnnotation.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(IgrAxisAnnotation.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(IgrAxisAnnotation.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(IgrAxisAnnotation.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(IgrAxisAnnotation.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(IgrAxisAnnotation.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(IgrAxisAnnotation.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(IgrAxisAnnotation.prototype, "isPillShaped", { /** * Gets or sets whether the annotation is pill shaped. This will automatically adjust the background corner radius to make * it appear pill shaped. */ get: function () { return this.i.isPillShaped; }, set: function (v) { this.i.isPillShaped = ensureBool(v); }, enumerable: false, configurable: true }); Object.defineProperty(IgrAxisAnnotation.prototype, "isBadgeEnabled", { /** * Gets or sets whether the badge is enabled in the annotation. */ get: function () { return this.i.isBadgeEnabled; }, set: function (v) { this.i.isBadgeEnabled = ensureBool(v); }, enumerable: false, configurable: true }); Object.defineProperty(IgrAxisAnnotation.prototype, "badgeBackground", { /** * Gets or sets the background color to use for the badge inside the axis annotation box. */ get: function () { return brushToString(this.i.badgeBackground); }, set: function (v) { this.i.badgeBackground = stringToBrush(v); }, enumerable: false, configurable: true }); Object.defineProperty(IgrAxisAnnotation.prototype, "badgeOutline", { /** * Gets or sets the outline color to use for the badge inside the axis annotation box. */ get: function () { return brushToString(this.i.badgeOutline); }, set: function (v) { this.i.badgeOutline = stringToBrush(v); }, enumerable: false, configurable: true }); Object.defineProperty(IgrAxisAnnotation.prototype, "badgeOutlineThickness", { /** * Gets or sets the outline thickness for the badge inside the axis annotation box. */ get: function () { return this.i.badgeOutlineThickness; }, set: function (v) { this.i.badgeOutlineThickness = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrAxisAnnotation.prototype, "badgeCornerRadius", { /** * Gets or sets the corner radius for the badge inside the axis annotation box. */ get: function () { return this.i.badgeCornerRadius; }, set: function (v) { this.i.badgeCornerRadius = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrAxisAnnotation.prototype, "badgeMargin", { /** * Gets or sets the spacing between the badge and text inside the axis annotation box. */ get: function () { return this.i.badgeMargin; }, set: function (v) { this.i.badgeMargin = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrAxisAnnotation.prototype, "badgeSize", { /** * Gets or sets the size of the badge inside the axis annotation box. */ get: function () { return this.i.badgeSize; }, set: function (v) { this.i.badgeSize = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrAxisAnnotation.prototype, "badgeImagePath", { /** * Gets or sets the image path to use for the badge. */ get: function () { return this.i.badgeImagePath; }, set: function (v) { this.i.badgeImagePath = v; }, enumerable: false, configurable: true }); IgrAxisAnnotation.prototype.findByName = function (name) { if (this.findEphemera) { if (name && name.indexOf("@@e:") == 0) { return this.findEphemera(name); } } if (this.labelFormatSpecifiers != null && arrayFindByName(this.labelFormatSpecifiers, name)) { return arrayFindByName(this.labelFormatSpecifiers, name); } return null; }; IgrAxisAnnotation.prototype.resetCachedExtent = function () { this.i.resetCachedExtent(); }; IgrAxisAnnotation.prototype.resolveLabelValue = function () { var iv = this.i.resolveLabelValue(); return (iv); }; return IgrAxisAnnotation; }()); export { IgrAxisAnnotation };