UNPKG

igniteui-react-charts

Version:

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

104 lines (103 loc) 4.42 kB
/* THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE AGREEMENT ("AGREEMENT") LOCATED HERE: https://www.infragistics.com/legal/license/igultimate-la https://www.infragistics.com/legal/license/igultimate-eula GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE: you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company. */ import { __extends } from "tslib"; import { DependencyObject } from "igniteui-react-core"; import { INotifyPropertyChanged_$type, PropertyChangedEventArgs, Array_$type, markType, markDep } from "igniteui-react-core"; import { IAxisAnnotation_$type } from "./IAxisAnnotation"; import { DependencyProperty } from "igniteui-react-core"; import { Brush } from "igniteui-react-core"; import { BindingFormatter } from "igniteui-react-core"; import { Thickness } from "igniteui-react-core"; import { PropertyMetadata } from "igniteui-react-core"; /** * @hidden */ var AxisAnnotation = /** @class */ /*@__PURE__*/ (function (_super) { __extends(AxisAnnotation, _super); function AxisAnnotation() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.propertyChanged = null; _this.l = false; _this._formatLabel = null; _this.k = false; _this.j = null; return _this; } AxisAnnotation.prototype.resetCachedExtent = function () { this.l = true; }; AxisAnnotation.prototype.checkForExtentReset = function (a) { if (this.l) { this.l = false; a(); } }; AxisAnnotation.prototype.ae = function (a, b, c) { this.ad(a, b, c); if (this.propertyChanged != null) { this.propertyChanged(this, new PropertyChangedEventArgs(a)); } }; AxisAnnotation.prototype.ad = function (a, b, c) { this.k = true; switch (a) { case AxisAnnotation.$$p[6]: case AxisAnnotation.$$p[7]: if (this.labelFormat != null) { this.j = new BindingFormatter(); this.j.j = this.labelFormat; this.j.d = this.labelFormatSpecifiers; } else { this.j = null; } break; } }; AxisAnnotation.prototype.resolveLabelValue = function () { if (this.text != null) { return this.text; } if (this.formatLabel != null) { return this.formatLabel(this.value); } if (this.j != null) { return this.j.i(this.value); } if (this.value == null) { return null; } return this.value.toString(); }; Object.defineProperty(AxisAnnotation.prototype, "formatLabel", { get: function () { return this._formatLabel; }, set: function (a) { this._formatLabel = a; }, enumerable: false, configurable: true }); Object.defineProperty(AxisAnnotation.prototype, "backgroundPadding", { get: function () { return new Thickness(1, this.backgroundPaddingLeft, this.backgroundPaddingTop, this.backgroundPaddingRight, this.backgroundPaddingBottom); }, set: function (a) { this.backgroundPaddingLeft = a.left; this.backgroundPaddingTop = a.top; this.backgroundPaddingRight = a.right; this.backgroundPaddingBottom = a.bottom; }, enumerable: false, configurable: true }); AxisAnnotation.$t = markType(AxisAnnotation, 'AxisAnnotation', DependencyObject.$, [INotifyPropertyChanged_$type, IAxisAnnotation_$type]); AxisAnnotation.$$p = markDep(DependencyProperty, PropertyMetadata, AxisAnnotation, 'ae', ['BackgroundCornerRadius', [1, NaN], 'BackgroundPaddingBottom', [1, NaN], 'BackgroundPaddingLeft', [1, NaN], 'BackgroundPaddingRight', [1, NaN], 'BackgroundPaddingTop', [1, NaN], 'Background', [Brush.$, null], 'LabelFormat', [2, null], 'LabelFormatSpecifiers', [Array_$type, null], 'Outline', [Brush.$, null], 'StrokeThickness', [1, 0], 'TextColor', [Brush.$, null], 'Text', [2, null], 'Value', [4, null]]); return AxisAnnotation; }(DependencyObject)); export { AxisAnnotation };