UNPKG

igniteui-react-charts

Version:

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

1,045 lines (1,044 loc) 41.8 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, __read, __spreadArray } from "tslib"; import { DependencyObject } from "igniteui-react-core"; import { INotifyPropertyChanged_$type, PropertyChangedEventArgs, EnumUtil, typeCast, markType, markDep, runOn, delegateRemove, delegateCombine, enumGetBox } from "igniteui-react-core"; import { UserAnnotationTarget_$type } from "./UserAnnotationTarget"; import { Guid } from "igniteui-react-core"; import { DependencyProperty } from "igniteui-react-core"; import { Brush } from "igniteui-react-core"; import { JsonDictionaryObject } from "igniteui-react-core"; import { FontInfo } from "igniteui-react-core"; import { JsonDictionaryValue } from "igniteui-react-core"; import { CSSColorUtil } from "igniteui-react-core"; import { UserAnnotationInformation } from "./UserAnnotationInformation"; import { PropertyMetadata } from "igniteui-react-core"; import { DeviceUtils } from "igniteui-react-core"; import { isNaN_ } from "igniteui-react-core"; import { stringIsNullOrEmpty } from "igniteui-react-core"; import { Series } from "./Series"; import { SeriesMatcher } from "./SeriesMatcher"; import { SeriesMatcherHelper } from "./SeriesMatcherHelper"; import { Axis } from "./Axis"; import { AxisMatcher } from "./AxisMatcher"; import { AxisMatcherHelper } from "./AxisMatcherHelper"; import { DataAnnotationDisplayMode_$type } from "./DataAnnotationDisplayMode"; import { OverlayTextLocation_$type } from "./OverlayTextLocation"; import { AnnotationAppearanceMode_$type } from "./AnnotationAppearanceMode"; import { OverlayTextUtil } from "./OverlayTextUtil"; /** * @hidden */ var UserBaseAnnotation = /** @class */ /*@__PURE__*/ (function (_super) { __extends(UserBaseAnnotation, _super); function UserBaseAnnotation() { var _this = _super.apply(this, __spreadArray([], __read(arguments), false)) || this; _this.k = 0; _this.ab = null; _this.propertyChanged = null; _this.q = false; return _this; } UserBaseAnnotation.prototype.m = function (a) { var b = new JsonDictionaryObject(); if (a.q != null) { b.item("fontFamily", ((function () { var $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = a.q; return $ret; })())); } if (!isNaN_(a.f)) { b.item("fontSize", ((function () { var $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = a.f; return $ret; })())); } if (a.v != null) { b.item("fontWeight", ((function () { var $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = stringIsNullOrEmpty(a.v) ? "Normal" : a.v; return $ret; })())); } if (a.t != null) { b.item("fontStyle", ((function () { var $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = stringIsNullOrEmpty(a.t) ? "Normal" : a.t; return $ret; })())); } if (a.r != null) { b.item("fontStretch", ((function () { var $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = a.r; return $ret; })())); } return b; }; UserBaseAnnotation.prototype.o = function (a) { var b = new FontInfo(); if (a.k("fontFamily")) { b.q = a.o("fontFamily"); } if (a.j("fontSize")) { b.f = a.n("fontSize"); } if (a.k("fontWeight")) { b.v = a.o("fontWeight"); } if (a.k("fontStyle")) { b.t = a.o("fontStyle"); } if (a.k("fontStretch")) { b.r = a.o("fontStretch"); } return b; }; UserBaseAnnotation.prototype.ay = function (a) { }; Object.defineProperty(UserBaseAnnotation.prototype, "an", { get: function () { if (this.ab == null) { this.ab = Guid.newGuid().toString(); } return this.ab; }, set: function (a) { this.ab = a; }, enumerable: false, configurable: true }); UserBaseAnnotation.prototype.n = function () { var _this = this; var a = new JsonDictionaryObject(); a.item("type", ((function () { var $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = EnumUtil.getName(UserAnnotationTarget_$type, _this.k); return $ret; })())); a.item("identifier", ((function () { var $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = _this.an; return $ret; })())); if (this.aq != null) { a.item("label", ((function () { var $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = _this.aq; return $ret; })())); } if (this.ac != null) { a.item("annotationData", ((function () { var $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = _this.ac; return $ret; })())); } if (!this.s) { a.item("isVisible", ((function () { var $ret = new JsonDictionaryValue(); $ret.e = 1; $ret.value = false; return $ret; })())); } if (this.bo != null) { a.item("labelColor", ((function () { var $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = CSSColorUtil.c(_this.bo); return $ret; })())); } if (this.bm != null) { a.item("labelBackground", ((function () { var $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = CSSColorUtil.c(_this.bm); return $ret; })())); } if (this.bn != null) { a.item("labelBorderColor", ((function () { var $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = CSSColorUtil.c(_this.bn); return $ret; })())); } if (!isNaN_(this.y)) { a.item("labelBorderThickness", ((function () { var $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = _this.y; return $ret; })())); } if (this.x != 3) { a.item("labelBorderRadius", ((function () { var $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = _this.x; return $ret; })())); } if (!isNaN_(this.z)) { a.item("labelPadding", ((function () { var $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = _this.z; return $ret; })())); } if (!this.p) { a.item("badgeVisible", ((function () { var $ret = new JsonDictionaryValue(); $ret.e = 1; $ret.value = false; return $ret; })())); } if (this.bk != null) { a.item("badgeBackground", ((function () { var $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = CSSColorUtil.c(_this.bk); return $ret; })())); } if (this.bl != null) { a.item("badgeOutline", ((function () { var $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = CSSColorUtil.c(_this.bl); return $ret; })())); } if (this.w != 0) { a.item("badgeThickness", ((function () { var $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = _this.w; return $ret; })())); } if (this.v != 15) { a.item("badgeSize", ((function () { var $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = _this.v; return $ret; })())); } if (this.t != 9) { a.item("badgeCornerRadius", ((function () { var $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = _this.t; return $ret; })())); } if (this.u != 5) { a.item("badgeMargin", ((function () { var $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = _this.u; return $ret; })())); } if (this.ag != null) { a.item("badgeImagePath", ((function () { var $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = _this.ag; return $ret; })())); } return a; }; UserBaseAnnotation.prototype.az = function (a) { if (a.k("identifier")) { this.an = a.o("identifier"); } if (a.k("label")) { this.aq = a.o("label"); } if (a.k("annotationData")) { this.ac = a.o("annotationData"); } if (a.i("isVisible")) { this.s = a.h("isVisible"); } if (a.k("labelColor")) { this.bo = CSSColorUtil.g(a.o("labelColor")); } if (a.k("labelBackground")) { this.bm = CSSColorUtil.g(a.o("labelBackground")); } if (a.k("labelBorderColor")) { this.bn = CSSColorUtil.g(a.o("labelBorderColor")); } if (a.j("labelBorderThickness")) { this.y = a.n("labelBorderThickness"); } if (a.j("labelBorderRadius")) { this.x = a.n("labelBorderRadius"); } if (a.j("labelPadding")) { this.z = a.n("labelPadding"); } if (a.i("badgeVisible")) { this.p = a.h("badgeVisible"); } if (a.k("badgeBackground")) { this.bk = CSSColorUtil.g(a.o("badgeBackground")); } if (a.k("badgeOutline")) { this.bl = CSSColorUtil.g(a.o("badgeOutline")); } if (a.j("badgeThickness")) { this.w = a.n("badgeThickness"); } if (a.j("badgeSize")) { this.v = a.n("badgeSize"); } if (a.j("badgeCornerRadius")) { this.t = a.n("badgeCornerRadius"); } if (a.j("badgeMargin")) { this.u = a.n("badgeMargin"); } if (a.k("badgeCornerRadius")) { this.t = a.n("badgeCornerRadius"); } }; UserBaseAnnotation.l = function (a) { if (!a.k("type")) { return null; } var b = a.o("type"); if (b == null) { return null; } var c = 1; if (!((function () { var d = EnumUtil.tryParse$1(UserAnnotationTarget_$type, b, true, c); c = d.p2; return d.ret; })())) { return null; } var d = null; switch (c) { case 3: d = new UserAxisAnnotation(); break; case 1: d = new UserStripAnnotation(); break; case 0: d = new UserSliceAnnotation(); break; case 2: d = new UserPointAnnotation(); break; } d.az(a); return d; }; UserBaseAnnotation.prototype.a1 = function (a, b, c) { this.a0(a, b, c); if (this.propertyChanged != null) { this.propertyChanged(this, new PropertyChangedEventArgs(a)); } }; UserBaseAnnotation.prototype.a0 = function (a, b, c) { this.q = true; }; UserBaseAnnotation.prototype.j = function () { var a = new UserAnnotationInformation(); a.d = this.an; a.h = this.bk; a.f = this.aq; a.i = this.bm; a.c = this.ac; return a; }; UserBaseAnnotation.$t = markType(UserBaseAnnotation, 'UserBaseAnnotation', DependencyObject.$, [INotifyPropertyChanged_$type]); UserBaseAnnotation.aa = 0; UserBaseAnnotation.$$p = markDep(DependencyProperty, PropertyMetadata, UserBaseAnnotation, 'a1', ['AnnotationData:ac:a2', [2, null], 'BadgeBackground:bk:a3', [Brush.$, null], 'BadgeCornerRadius:t:a4', [1, 8], 'BadgeImagePath:ag:a5', [2, null], 'BadgeMargin:u:a6', [1, 5], 'BadgeOutline:bl:a7', [Brush.$, null], 'BadgeSize:v:a8', [1, 15], 'BadgeThickness:w:a9', [1, 0], 'BadgeVisible:p:ba', [0, true], 'IsPillShaped:r:bb', [0, true], 'IsVisible:s:bc', [0, true], 'LabelBackground:bm:bd', [Brush.$, null], 'LabelBorderColor:bn:be', [Brush.$, null], 'LabelBorderRadius:x:bf', [1, DeviceUtils.g(3)], 'LabelBorderThickness:y:bg', [1, NaN], 'LabelColor:bo:bh', [Brush.$, null], 'LabelPadding:z:bi', [1, NaN], 'Label:aq:bj', [2, null]]); return UserBaseAnnotation; }(DependencyObject)); export { UserBaseAnnotation }; /** * @hidden */ var UserPointAnnotation = /** @class */ /*@__PURE__*/ (function (_super) { __extends(UserPointAnnotation, _super); function UserPointAnnotation() { var _this = _super.call(this) || this; _this.k = 2; return _this; } UserPointAnnotation.prototype.az = function (a) { _super.prototype.az.call(this, a); if (a.g("targetSeriesMatcher") && typeCast(JsonDictionaryObject.$, a.item("targetSeriesMatcher")) !== null) { this.targetSeriesMatcher = SeriesMatcher.a(a.item("targetSeriesMatcher")); } if (a.j("xValue")) { this.xValue = a.n("xValue"); } if (a.j("yValue")) { this.yValue = a.n("yValue"); } }; UserPointAnnotation.prototype.n = function () { var _this = this; var a = _super.prototype.n.call(this); var b = null; if (this.targetSeriesMatcher == null && this.targetSeries != null) { b = this.targetSeries.cg(); } else if (this.targetSeriesMatcher != null) { b = this.targetSeriesMatcher; } if (b != null) { var c = b.b(); a.item("targetSeriesMatcher", c); } if (!isNaN_(this.xValue)) { a.item("xValue", ((function () { var $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = _this.xValue; return $ret; })())); } if (!isNaN_(this.yValue)) { a.item("yValue", ((function () { var $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = _this.yValue; return $ret; })())); } return a; }; UserPointAnnotation.prototype.ay = function (a) { if (this.targetSeriesMatcher != null && this.targetSeries == null) { var b = SeriesMatcherHelper.a(a, this.targetSeriesMatcher); if (b != null && b.length > 0) { this.targetSeries = b[0]; } } }; UserPointAnnotation.$t = markType(UserPointAnnotation, 'UserPointAnnotation', UserBaseAnnotation.$); UserPointAnnotation.$$p = markDep(DependencyProperty, PropertyMetadata, UserPointAnnotation, 'a1', ['TargetSeriesMatcher', [SeriesMatcher.$, null], 'TargetSeries', [Series.$, null], 'XValue', [1, NaN], 'YValue', [1, NaN]]); return UserPointAnnotation; }(UserBaseAnnotation)); export { UserPointAnnotation }; /** * @hidden */ var UserAxisAnnotation = /** @class */ /*@__PURE__*/ (function (_super) { __extends(UserAxisAnnotation, _super); function UserAxisAnnotation() { var _this = _super.call(this) || this; _this.k = 3; return _this; } UserAxisAnnotation.prototype.a0 = function (a, b, c) { _super.prototype.a0.call(this, a, b, c); switch (a) { case UserAxisAnnotation.$$p[1]: if (b != null) { var d = b; d.propertyUpdated = delegateRemove(d.propertyUpdated, runOn(this, this.bv)); } if (c != null) { var e = c; e.propertyUpdated = delegateCombine(e.propertyUpdated, runOn(this, this.bv)); } break; } }; UserAxisAnnotation.prototype.bv = function (a, b) { switch (b.propertyName) { case "SeriesViewer": if (b.newValue == null) { this.targetAxis = null; } break; } }; UserAxisAnnotation.prototype.az = function (a) { _super.prototype.az.call(this, a); if (a.g("targetAxisMatcher") && typeCast(JsonDictionaryObject.$, a.item("targetAxisMatcher")) !== null) { this.targetAxisMatcher = AxisMatcher.a(a.item("targetAxisMatcher")); } if (a.j("value")) { this.value = a.n("value"); } }; UserAxisAnnotation.prototype.n = function () { var _this = this; var a = _super.prototype.n.call(this); var b = null; if (this.targetAxisMatcher == null && this.targetAxis != null) { b = this.targetAxis.a9(); } else if (this.targetAxisMatcher != null) { b = this.targetAxisMatcher; } if (b != null) { var c = b.b(); a.item("targetAxisMatcher", c); } if (!isNaN_(this.value)) { a.item("value", ((function () { var $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = _this.value; return $ret; })())); } return a; }; UserAxisAnnotation.prototype.ay = function (a) { if (this.targetAxisMatcher != null && this.targetAxis == null) { var b = AxisMatcherHelper.a(a, this.targetAxisMatcher); if (b != null && b.length > 0) { this.targetAxis = b[0]; } } }; UserAxisAnnotation.$t = markType(UserAxisAnnotation, 'UserAxisAnnotation', UserBaseAnnotation.$); UserAxisAnnotation.$$p = markDep(DependencyProperty, PropertyMetadata, UserAxisAnnotation, 'a1', ['TargetAxisMatcher', [AxisMatcher.$, null], 'TargetAxis', [Axis.$, null], 'Value', [1, NaN]]); return UserAxisAnnotation; }(UserBaseAnnotation)); export { UserAxisAnnotation }; /** * @hidden */ var UserShapeAnnotation = /** @class */ /*@__PURE__*/ (function (_super) { __extends(UserShapeAnnotation, _super); function UserShapeAnnotation() { var _this = _super.apply(this, __spreadArray([], __read(arguments), false)) || this; _this.b4 = null; return _this; } UserShapeAnnotation.prototype.az = function (a) { _super.prototype.az.call(this, a); if (a.k("valueDisplayMode")) { var b_1 = a.o("valueDisplayMode"); var c_1 = 0; if (((function () { var d = EnumUtil.tryParse$1(DataAnnotationDisplayMode_$type, b_1, true, c_1); c_1 = d.p2; return d.ret; })())) { this.valueDisplayMode = c_1; } } if (a.k("shapeBackground")) { this.shapeBackground = CSSColorUtil.g(a.o("shapeBackground")); } if (a.k("shapeOutline")) { this.shapeOutline = CSSColorUtil.g(a.o("shapeOutline")); } if (a.j("shapeThickness")) { this.shapeThickness = a.n("shapThickness"); } if (a.k("overlayText")) { this.overlayText = a.o("overlayText"); } if (a.k("overlayTextLocation")) { var d_1 = a.o("overlayTextLocation"); var e_1 = 0; if (((function () { var f = EnumUtil.tryParse$1(OverlayTextLocation_$type, d_1, true, e_1); e_1 = f.p2; return f.ret; })())) { this.overlayTextLocation = e_1; } } if (a.j("overlayTextHorizontalMargin")) { this.overlayTextHorizontalMargin = a.n("overlayTextHorizontalMargin"); } if (a.j("overlayTextVerticalMargin")) { this.overlayTextVerticalMargin = a.n("overlayTextVerticalMargin"); } if (a.j("overlayTextHorizontalPadding")) { this.overlayTextHorizontalPadding = a.n("overlayTextHorizontalPadding"); } if (a.j("overlayTextVerticalPadding")) { this.overlayTextVerticalPadding = a.n("overlayTextVerticalPadding"); } if (a.j("overlayTextAngle")) { this.overlayTextAngle = a.n("overlayTextAngle"); } if (a.k("overlayTextColor")) { this.overlayTextColor = CSSColorUtil.g(a.o("overlayTextColor")); } if (a.j("overlayTextColorShift")) { this.overlayTextColorShift = a.n("overlayTextColorShift"); } if (a.k("overlayTextColorMode")) { var f_1 = a.o("overlayTextColorMode"); var g_1 = 0; if (((function () { var h = EnumUtil.tryParse$1(AnnotationAppearanceMode_$type, f_1, true, g_1); g_1 = h.p2; return h.ret; })())) { this.overlayTextColorMode = g_1; } } if (a.k("overlayTextBackground")) { this.overlayTextBackground = CSSColorUtil.g(a.o("overlayTextBackground")); } if (a.j("overlayTextBackgroundShift")) { this.overlayTextBackgroundShift = a.n("overlayTextBackgroundShift"); } if (a.k("overlayTextBackgroundMode")) { var h_1 = a.o("overlayTextBackgroundMode"); var i_1 = 0; if (((function () { var j = EnumUtil.tryParse$1(AnnotationAppearanceMode_$type, h_1, true, i_1); i_1 = j.p2; return j.ret; })())) { this.overlayTextBackgroundMode = i_1; } } if (a.k("overlayTextBorderColor")) { this.overlayTextBorderColor = CSSColorUtil.g(a.o("overlayTextBorderColor")); } if (a.j("overlayTextColorShift")) { this.overlayTextColorShift = a.n("overlayTextColorShift"); } if (a.k("overlayTextBorderMode")) { var j_1 = a.o("overlayTextBorderMode"); var k_1 = 0; if (((function () { var l = EnumUtil.tryParse$1(AnnotationAppearanceMode_$type, j_1, true, k_1); k_1 = l.p2; return l.ret; })())) { this.overlayTextBorderMode = k_1; } } if (a.k("overlayTextLocation")) { var l_1 = a.o("overlayTextLocation"); var m_1 = 0; if (((function () { var n = EnumUtil.tryParse$1(OverlayTextLocation_$type, l_1, true, m_1); m_1 = n.p2; return n.ret; })())) { this.overlayTextLocation = this.overlayTextLocation; } } if (a.j("overlayTextBorderRadius")) { this.overlayTextBorderRadius = a.n("overlayTextBorderRadius"); } if (a.j("overlayTextBorderThickness")) { this.overlayTextBorderThickness = a.n("overlayTextBorderThickness"); } if (a.i("overlayTextVisible")) { this.overlayTextVisible = a.h("overlayTextVisible"); } if (a.g("overlayTextStyle") && typeCast(JsonDictionaryObject.$, a.item("overlayTextStyle")) !== null) { this.overlayTextStyle = this.o(a.item("overlayTextStyle")); } }; UserShapeAnnotation.prototype.n = function () { var _this = this; var a = _super.prototype.n.call(this); if (this.valueDisplayMode != 0) { a.item("valueDisplayMode", ((function () { var $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = EnumUtil.getName(DataAnnotationDisplayMode_$type, _this.valueDisplayMode); return $ret; })())); } if (this.shapeBackground != null) { a.item("shapeBackground", ((function () { var $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = CSSColorUtil.c(_this.shapeBackground); return $ret; })())); } if (this.shapeOutline != null) { a.item("shapeOutline", ((function () { var $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = CSSColorUtil.c(_this.shapeOutline); return $ret; })())); } if (!isNaN_(this.shapeThickness)) { a.item("shapeThickness", ((function () { var $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = _this.shapeThickness; return $ret; })())); } if (this.overlayText != null) { a.item("overlayText", ((function () { var $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = _this.overlayText; return $ret; })())); } if (this.overlayTextLocation != 0) { a.item("overlayTextLocation", ((function () { var $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = EnumUtil.getName(OverlayTextLocation_$type, _this.overlayTextLocation); return $ret; })())); } if (!isNaN_(this.overlayTextHorizontalMargin)) { a.item("overlayTextHorizontalMargin", ((function () { var $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = _this.overlayTextHorizontalMargin; return $ret; })())); } if (!isNaN_(this.overlayTextVerticalMargin)) { a.item("overlayTextVerticalMargin", ((function () { var $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = _this.overlayTextVerticalMargin; return $ret; })())); } if (!isNaN_(this.overlayTextHorizontalPadding)) { a.item("overlayTextHorizontalPadding", ((function () { var $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = _this.overlayTextHorizontalPadding; return $ret; })())); } if (!isNaN_(this.overlayTextVerticalPadding)) { a.item("overlayTextVerticalPadding", ((function () { var $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = _this.overlayTextVerticalPadding; return $ret; })())); } if (!isNaN_(this.overlayTextAngle)) { a.item("overlayTextAngle", ((function () { var $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = _this.overlayTextAngle; return $ret; })())); } if (this.overlayTextColor != null) { a.item("overlayTextColor", ((function () { var $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = CSSColorUtil.c(_this.overlayTextColor); return $ret; })())); } if (!isNaN_(this.overlayTextColorShift)) { a.item("overlayTextColorShift", ((function () { var $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = _this.overlayTextColorShift; return $ret; })())); } if (this.overlayTextColorMode != 0) { a.item("overlayTextColorMode", ((function () { var $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = EnumUtil.getName(AnnotationAppearanceMode_$type, _this.overlayTextColorMode); return $ret; })())); } if (this.overlayTextBackground != null) { a.item("overlayTextBackground", ((function () { var $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = CSSColorUtil.c(_this.overlayTextBackground); return $ret; })())); } if (!isNaN_(this.overlayTextBackgroundShift)) { a.item("overlayTextBackgroundShift", ((function () { var $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = _this.overlayTextBackgroundShift; return $ret; })())); } if (this.overlayTextBackgroundMode != 0) { a.item("overlayTextBackgroundMode", ((function () { var $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = EnumUtil.getName(AnnotationAppearanceMode_$type, _this.overlayTextBackgroundMode); return $ret; })())); } if (this.overlayTextBorderColor != null) { a.item("overlayTextBorder", ((function () { var $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = CSSColorUtil.c(_this.overlayTextBorderColor); return $ret; })())); } if (!isNaN_(this.overlayTextColorShift)) { a.item("overlayTextColorShift", ((function () { var $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = _this.overlayTextColorShift; return $ret; })())); } if (this.overlayTextBorderMode != 0) { a.item("overlayTextBorderMode", ((function () { var $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = EnumUtil.getName(AnnotationAppearanceMode_$type, _this.overlayTextBorderMode); return $ret; })())); } if (this.overlayTextLocation != 0) { a.item("overlayTextLocation", ((function () { var $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = EnumUtil.getName(AnnotationAppearanceMode_$type, _this.overlayTextBorderMode); return $ret; })())); } if (!isNaN_(this.overlayTextBorderRadius)) { a.item("overlayTextBorderRadius", ((function () { var $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = _this.overlayTextBorderRadius; return $ret; })())); } if (!isNaN_(this.overlayTextBorderThickness)) { a.item("overlayTextBorderThickness", ((function () { var $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = _this.overlayTextBorderThickness; return $ret; })())); } if (!this.overlayTextVisible) { a.item("overlayTextVisible", ((function () { var $ret = new JsonDictionaryValue(); $ret.e = 1; $ret.value = _this.overlayTextVisible; return $ret; })())); } if (this.overlayTextStyle != null) { a.item("overlayTextStyle", this.m(this.overlayTextStyle)); } return a; }; Object.defineProperty(UserShapeAnnotation.prototype, "overlayTextStyle", { get: function () { return this.b4; }, set: function (a) { var b = this.b4; if (OverlayTextUtil.q(a)) { a = OverlayTextUtil.c(); } this.b4 = a; if (b != this.b4) { this.a1("OverlayTextStyle", b, this.b4); } }, enumerable: false, configurable: true }); UserShapeAnnotation.$t = markType(UserShapeAnnotation, 'UserShapeAnnotation', UserAxisAnnotation.$); UserShapeAnnotation.$$p = markDep(DependencyProperty, PropertyMetadata, UserShapeAnnotation, 'a1', ['OverlayTextAngle', [1, NaN], 'OverlayTextBackgroundMode', [AnnotationAppearanceMode_$type, enumGetBox(AnnotationAppearanceMode_$type, 0)], 'OverlayTextBackground', [Brush.$, null], 'OverlayTextBackgroundShift', [1, NaN], 'OverlayTextBorderColor', [Brush.$, null], 'OverlayTextBorderMode', [AnnotationAppearanceMode_$type, enumGetBox(AnnotationAppearanceMode_$type, 0)], 'OverlayTextBorderRadius', [1, NaN], 'OverlayTextBorderShift', [1, NaN], 'OverlayTextBorderThickness', [1, NaN], 'OverlayTextColorMode', [AnnotationAppearanceMode_$type, enumGetBox(AnnotationAppearanceMode_$type, 0)], 'OverlayTextColor', [Brush.$, null], 'OverlayTextColorShift', [1, NaN], 'OverlayTextHorizontalMargin', [1, NaN], 'OverlayTextHorizontalPadding', [1, NaN], 'OverlayTextLocation', [OverlayTextLocation_$type, enumGetBox(OverlayTextLocation_$type, 0)], 'OverlayText', [2, null], 'OverlayTextVerticalMargin', [1, NaN], 'OverlayTextVerticalPadding', [1, NaN], 'OverlayTextVisible', [0, true], 'ShapeBackground', [Brush.$, null], 'ShapeOutline', [Brush.$, null], 'ShapeThickness', [1, NaN], 'ValueDisplayMode', [DataAnnotationDisplayMode_$type, enumGetBox(DataAnnotationDisplayMode_$type, 0)]]); return UserShapeAnnotation; }(UserAxisAnnotation)); export { UserShapeAnnotation }; /** * @hidden */ var UserSliceAnnotation = /** @class */ /*@__PURE__*/ (function (_super) { __extends(UserSliceAnnotation, _super); function UserSliceAnnotation() { var _this = _super.call(this) || this; _this.k = 0; return _this; } UserSliceAnnotation.$t = markType(UserSliceAnnotation, 'UserSliceAnnotation', UserShapeAnnotation.$); return UserSliceAnnotation; }(UserShapeAnnotation)); export { UserSliceAnnotation }; /** * @hidden */ var UserStripAnnotation = /** @class */ /*@__PURE__*/ (function (_super) { __extends(UserStripAnnotation, _super); function UserStripAnnotation() { var _this = _super.call(this) || this; _this.k = 1; return _this; } UserStripAnnotation.prototype.az = function (a) { _super.prototype.az.call(this, a); if (a.j("startValue")) { this.startValue = a.n("startValue"); } if (a.k("startLabel")) { this.startLabel = a.o("startLabel"); } if (a.j("endValue")) { this.endValue = a.n("endValue"); } if (a.k("endLabel")) { this.endLabel = a.o("endLabel"); } if (a.k("startLabelColor")) { this.startLabelColor = CSSColorUtil.g(a.o("startLabelColor")); } if (a.k("endLabelColor")) { this.endLabelColor = CSSColorUtil.g(a.o("endLabelColor")); } if (a.k("startLabelBorderColor")) { this.startLabelBorderColor = CSSColorUtil.g(a.o("startLabelBorderColor")); } if (a.k("endLabelBorderColor")) { this.endLabelBorderColor = CSSColorUtil.g(a.o("endLabelBorderColor")); } if (a.k("startLabelBackground")) { this.startLabelBackground = CSSColorUtil.g(a.o("startLabelBackground")); } if (a.k("endLabelBackground")) { this.endLabelBackground = CSSColorUtil.g(a.o("endLabelBackground")); } if (a.k("startValueDisplayMode")) { var b_2 = a.o("startValueDisplayMode"); var c_2 = 0; if (((function () { var d = EnumUtil.tryParse$1(DataAnnotationDisplayMode_$type, b_2, true, c_2); c_2 = d.p2; return d.ret; })())) { this.startValueDisplayMode = c_2; } } if (a.k("endValueDisplayMode")) { var d_2 = a.o("endValueDisplayMode"); var e_2 = 0; if (((function () { var f = EnumUtil.tryParse$1(DataAnnotationDisplayMode_$type, d_2, true, e_2); e_2 = f.p2; return f.ret; })())) { this.endValueDisplayMode = e_2; } } }; UserStripAnnotation.prototype.n = function () { var _this = this; var a = _super.prototype.n.call(this); if (!isNaN_(this.startValue)) { a.item("startValue", ((function () { var $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = _this.startValue; return $ret; })())); } if (this.startLabel != null) { a.item("startLabel", ((function () { var $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = _this.startLabel; return $ret; })())); } if (!isNaN_(this.endValue)) { a.item("endValue", ((function () { var $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = _this.endValue; return $ret; })())); } if (this.endLabel != null) { a.item("endLabel", ((function () { var $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = _this.endLabel; return $ret; })())); } if (this.startLabelColor != null) { a.item("startLabelColor", ((function () { var $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = CSSColorUtil.c(_this.startLabelColor); return $ret; })())); } if (this.endLabelColor != null) { a.item("endLabelColor", ((function () { var $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = CSSColorUtil.c(_this.endLabelColor); return $ret; })())); } if (this.startLabelBorderColor != null) { a.item("startLabelBorderColor", ((function () { var $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = CSSColorUtil.c(_this.startLabelBorderColor); return $ret; })())); } if (this.endLabelBorderColor != null) { a.item("endLabelBorderColor", ((function () { var $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = CSSColorUtil.c(_this.endLabelBorderColor); return $ret; })())); } if (this.startLabelBackground != null) { a.item("startLabelBackground", ((function () { var $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = CSSColorUtil.c(_this.startLabelBackground); return $ret; })())); } if (this.endLabelBackground != null) { a.item("endLabelBackground", ((function () { var $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = CSSColorUtil.c(_this.endLabelBackground); return $ret; })())); } if (this.startValueDisplayMode != 0) { a.item("startValueDisplayMode", ((function () { var $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = EnumUtil.getName(DataAnnotationDisplayMode_$type, _this.startValueDisplayMode); return $ret; })())); } if (this.endValueDisplayMode != 0) { a.item("endValueDisplayMode", ((function () { var $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = EnumUtil.getName(DataAnnotationDisplayMode_$type, _this.endValueDisplayMode); return $ret; })())); } return a; }; UserStripAnnotation.$t = markType(UserStripAnnotation, 'UserStripAnnotation', UserShapeAnnotation.$); UserStripAnnotation.$$p = markDep(DependencyProperty, PropertyMetadata, UserStripAnnotation, 'a1', ['EndLabelBackground', [Brush.$, null], 'EndLabelBorderColor', [Brush.$, null], 'EndLabelColor', [Brush.$, null], 'EndLabel', [2, null], 'EndValueDisplayMode', [DataAnnotationDisplayMode_$type, enumGetBox(DataAnnotationDisplayMode_$type, 0)], 'EndValue', [1, NaN], 'StartLabelBackground', [Brush.$, null], 'StartLabelBorderColor', [Brush.$, null], 'StartLabelColor', [Brush.$, null], 'StartLabel', [2, null], 'StartValueDisplayMode', [DataAnnotationDisplayMode_$type, enumGetBox(DataAnnotationDisplayMode_$type, 0)], 'StartValue', [1, NaN]]); return UserStripAnnotation; }(UserShapeAnnotation)); export { UserStripAnnotation };