UNPKG

igniteui-angular-charts

Version:

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

1,025 lines (1,024 loc) 43.6 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 { DependencyObject } from "igniteui-angular-core"; import { INotifyPropertyChanged_$type, PropertyChangedEventArgs, EnumUtil, typeCast, markType, markDep, runOn, delegateRemove, delegateCombine, enumGetBox } from "igniteui-angular-core"; import { UserAnnotationTarget_$type } from "./UserAnnotationTarget"; import { Guid } from "igniteui-angular-core"; import { DependencyProperty } from "igniteui-angular-core"; import { Brush } from "igniteui-angular-core"; import { JsonDictionaryObject } from "igniteui-angular-core"; import { FontInfo } from "igniteui-angular-core"; import { JsonDictionaryValue } from "igniteui-angular-core"; import { CSSColorUtil } from "igniteui-angular-core"; import { UserAnnotationInformation } from "./UserAnnotationInformation"; import { PropertyMetadata } from "igniteui-angular-core"; import { DeviceUtils } from "igniteui-angular-core"; import { isNaN_ } from "igniteui-angular-core"; import { stringIsNullOrEmpty } from "igniteui-angular-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 */ export let UserBaseAnnotation = /*@__PURE__*/ (() => { class UserBaseAnnotation extends DependencyObject { constructor() { super(...arguments); this.k = 0; this.ab = null; this.propertyChanged = null; this.q = false; } m(a) { let b = new JsonDictionaryObject(); if (a.q != null) { b.item("fontFamily", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = a.q; return $ret; })())); } if (!isNaN_(a.f)) { b.item("fontSize", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = a.f; return $ret; })())); } if (a.v != null) { b.item("fontWeight", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = stringIsNullOrEmpty(a.v) ? "Normal" : a.v; return $ret; })())); } if (a.t != null) { b.item("fontStyle", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = stringIsNullOrEmpty(a.t) ? "Normal" : a.t; return $ret; })())); } if (a.r != null) { b.item("fontStretch", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = a.r; return $ret; })())); } return b; } o(a) { let 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; } ay(a) { } get an() { if (this.ab == null) { this.ab = Guid.newGuid().toString(); } return this.ab; } set an(a) { this.ab = a; } n() { let a = new JsonDictionaryObject(); a.item("type", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = EnumUtil.getName(UserAnnotationTarget_$type, this.k); return $ret; })())); a.item("identifier", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = this.an; return $ret; })())); if (this.aq != null) { a.item("label", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = this.aq; return $ret; })())); } if (this.ac != null) { a.item("annotationData", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = this.ac; return $ret; })())); } if (!this.s) { a.item("isVisible", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 1; $ret.value = false; return $ret; })())); } if (this.bo != null) { a.item("labelColor", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = CSSColorUtil.c(this.bo); return $ret; })())); } if (this.bm != null) { a.item("labelBackground", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = CSSColorUtil.c(this.bm); return $ret; })())); } if (this.bn != null) { a.item("labelBorderColor", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = CSSColorUtil.c(this.bn); return $ret; })())); } if (!isNaN_(this.y)) { a.item("labelBorderThickness", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = this.y; return $ret; })())); } if (this.x != 3) { a.item("labelBorderRadius", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = this.x; return $ret; })())); } if (!isNaN_(this.z)) { a.item("labelPadding", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = this.z; return $ret; })())); } if (!this.p) { a.item("badgeVisible", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 1; $ret.value = false; return $ret; })())); } if (this.bk != null) { a.item("badgeBackground", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = CSSColorUtil.c(this.bk); return $ret; })())); } if (this.bl != null) { a.item("badgeOutline", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = CSSColorUtil.c(this.bl); return $ret; })())); } if (this.w != 0) { a.item("badgeThickness", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = this.w; return $ret; })())); } if (this.v != 15) { a.item("badgeSize", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = this.v; return $ret; })())); } if (this.t != 9) { a.item("badgeCornerRadius", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = this.t; return $ret; })())); } if (this.u != 5) { a.item("badgeMargin", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = this.u; return $ret; })())); } if (this.ag != null) { a.item("badgeImagePath", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = this.ag; return $ret; })())); } return a; } az(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"); } } static l(a) { if (!a.k("type")) { return null; } let b = a.o("type"); if (b == null) { return null; } let c = 1; if (!((() => { let d = EnumUtil.tryParse$1(UserAnnotationTarget_$type, b, true, c); c = d.p2; return d.ret; })())) { return null; } let 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; } a1(a, b, c) { this.a0(a, b, c); if (this.propertyChanged != null) { this.propertyChanged(this, new PropertyChangedEventArgs(a)); } } a0(a, b, c) { this.q = true; } j() { let 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; })(); /** * @hidden */ export let UserPointAnnotation = /*@__PURE__*/ (() => { class UserPointAnnotation extends UserBaseAnnotation { constructor() { super(); this.k = 2; } az(a) { super.az(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"); } } n() { let a = super.n(); let b = null; if (this.targetSeriesMatcher == null && this.targetSeries != null) { b = this.targetSeries.cg(); } else if (this.targetSeriesMatcher != null) { b = this.targetSeriesMatcher; } if (b != null) { let c = b.b(); a.item("targetSeriesMatcher", c); } if (!isNaN_(this.xValue)) { a.item("xValue", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = this.xValue; return $ret; })())); } if (!isNaN_(this.yValue)) { a.item("yValue", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = this.yValue; return $ret; })())); } return a; } ay(a) { if (this.targetSeriesMatcher != null && this.targetSeries == null) { let 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; })(); /** * @hidden */ export let UserAxisAnnotation = /*@__PURE__*/ (() => { class UserAxisAnnotation extends UserBaseAnnotation { constructor() { super(); this.k = 3; } a0(a, b, c) { super.a0(a, b, c); switch (a) { case UserAxisAnnotation.$$p[1]: if (b != null) { let d = b; d.propertyUpdated = delegateRemove(d.propertyUpdated, runOn(this, this.bv)); } if (c != null) { let e = c; e.propertyUpdated = delegateCombine(e.propertyUpdated, runOn(this, this.bv)); } break; } } bv(a, b) { switch (b.propertyName) { case "SeriesViewer": if (b.newValue == null) { this.targetAxis = null; } break; } } az(a) { super.az(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"); } } n() { let a = super.n(); let b = null; if (this.targetAxisMatcher == null && this.targetAxis != null) { b = this.targetAxis.a9(); } else if (this.targetAxisMatcher != null) { b = this.targetAxisMatcher; } if (b != null) { let c = b.b(); a.item("targetAxisMatcher", c); } if (!isNaN_(this.value)) { a.item("value", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = this.value; return $ret; })())); } return a; } ay(a) { if (this.targetAxisMatcher != null && this.targetAxis == null) { let 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; })(); /** * @hidden */ export let UserShapeAnnotation = /*@__PURE__*/ (() => { class UserShapeAnnotation extends UserAxisAnnotation { constructor() { super(...arguments); this.b4 = null; } az(a) { super.az(a); if (a.k("valueDisplayMode")) { let b = a.o("valueDisplayMode"); let c = 0; if (((() => { let d = EnumUtil.tryParse$1(DataAnnotationDisplayMode_$type, b, true, c); c = d.p2; return d.ret; })())) { this.valueDisplayMode = c; } } 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")) { let d = a.o("overlayTextLocation"); let e = 0; if (((() => { let f = EnumUtil.tryParse$1(OverlayTextLocation_$type, d, true, e); e = f.p2; return f.ret; })())) { this.overlayTextLocation = e; } } 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")) { let f = a.o("overlayTextColorMode"); let g = 0; if (((() => { let h = EnumUtil.tryParse$1(AnnotationAppearanceMode_$type, f, true, g); g = h.p2; return h.ret; })())) { this.overlayTextColorMode = g; } } if (a.k("overlayTextBackground")) { this.overlayTextBackground = CSSColorUtil.g(a.o("overlayTextBackground")); } if (a.j("overlayTextBackgroundShift")) { this.overlayTextBackgroundShift = a.n("overlayTextBackgroundShift"); } if (a.k("overlayTextBackgroundMode")) { let h = a.o("overlayTextBackgroundMode"); let i = 0; if (((() => { let j = EnumUtil.tryParse$1(AnnotationAppearanceMode_$type, h, true, i); i = j.p2; return j.ret; })())) { this.overlayTextBackgroundMode = i; } } if (a.k("overlayTextBorderColor")) { this.overlayTextBorderColor = CSSColorUtil.g(a.o("overlayTextBorderColor")); } if (a.j("overlayTextColorShift")) { this.overlayTextColorShift = a.n("overlayTextColorShift"); } if (a.k("overlayTextBorderMode")) { let j = a.o("overlayTextBorderMode"); let k = 0; if (((() => { let l = EnumUtil.tryParse$1(AnnotationAppearanceMode_$type, j, true, k); k = l.p2; return l.ret; })())) { this.overlayTextBorderMode = k; } } if (a.k("overlayTextLocation")) { let l = a.o("overlayTextLocation"); let m = 0; if (((() => { let n = EnumUtil.tryParse$1(OverlayTextLocation_$type, l, true, m); m = 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")); } } n() { let a = super.n(); if (this.valueDisplayMode != 0) { a.item("valueDisplayMode", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = EnumUtil.getName(DataAnnotationDisplayMode_$type, this.valueDisplayMode); return $ret; })())); } if (this.shapeBackground != null) { a.item("shapeBackground", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = CSSColorUtil.c(this.shapeBackground); return $ret; })())); } if (this.shapeOutline != null) { a.item("shapeOutline", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = CSSColorUtil.c(this.shapeOutline); return $ret; })())); } if (!isNaN_(this.shapeThickness)) { a.item("shapeThickness", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = this.shapeThickness; return $ret; })())); } if (this.overlayText != null) { a.item("overlayText", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = this.overlayText; return $ret; })())); } if (this.overlayTextLocation != 0) { a.item("overlayTextLocation", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = EnumUtil.getName(OverlayTextLocation_$type, this.overlayTextLocation); return $ret; })())); } if (!isNaN_(this.overlayTextHorizontalMargin)) { a.item("overlayTextHorizontalMargin", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = this.overlayTextHorizontalMargin; return $ret; })())); } if (!isNaN_(this.overlayTextVerticalMargin)) { a.item("overlayTextVerticalMargin", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = this.overlayTextVerticalMargin; return $ret; })())); } if (!isNaN_(this.overlayTextHorizontalPadding)) { a.item("overlayTextHorizontalPadding", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = this.overlayTextHorizontalPadding; return $ret; })())); } if (!isNaN_(this.overlayTextVerticalPadding)) { a.item("overlayTextVerticalPadding", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = this.overlayTextVerticalPadding; return $ret; })())); } if (!isNaN_(this.overlayTextAngle)) { a.item("overlayTextAngle", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = this.overlayTextAngle; return $ret; })())); } if (this.overlayTextColor != null) { a.item("overlayTextColor", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = CSSColorUtil.c(this.overlayTextColor); return $ret; })())); } if (!isNaN_(this.overlayTextColorShift)) { a.item("overlayTextColorShift", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = this.overlayTextColorShift; return $ret; })())); } if (this.overlayTextColorMode != 0) { a.item("overlayTextColorMode", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = EnumUtil.getName(AnnotationAppearanceMode_$type, this.overlayTextColorMode); return $ret; })())); } if (this.overlayTextBackground != null) { a.item("overlayTextBackground", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = CSSColorUtil.c(this.overlayTextBackground); return $ret; })())); } if (!isNaN_(this.overlayTextBackgroundShift)) { a.item("overlayTextBackgroundShift", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = this.overlayTextBackgroundShift; return $ret; })())); } if (this.overlayTextBackgroundMode != 0) { a.item("overlayTextBackgroundMode", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = EnumUtil.getName(AnnotationAppearanceMode_$type, this.overlayTextBackgroundMode); return $ret; })())); } if (this.overlayTextBorderColor != null) { a.item("overlayTextBorder", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = CSSColorUtil.c(this.overlayTextBorderColor); return $ret; })())); } if (!isNaN_(this.overlayTextColorShift)) { a.item("overlayTextColorShift", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = this.overlayTextColorShift; return $ret; })())); } if (this.overlayTextBorderMode != 0) { a.item("overlayTextBorderMode", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = EnumUtil.getName(AnnotationAppearanceMode_$type, this.overlayTextBorderMode); return $ret; })())); } if (this.overlayTextLocation != 0) { a.item("overlayTextLocation", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = EnumUtil.getName(AnnotationAppearanceMode_$type, this.overlayTextBorderMode); return $ret; })())); } if (!isNaN_(this.overlayTextBorderRadius)) { a.item("overlayTextBorderRadius", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = this.overlayTextBorderRadius; return $ret; })())); } if (!isNaN_(this.overlayTextBorderThickness)) { a.item("overlayTextBorderThickness", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = this.overlayTextBorderThickness; return $ret; })())); } if (!this.overlayTextVisible) { a.item("overlayTextVisible", ((() => { let $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; } get overlayTextStyle() { return this.b4; } set overlayTextStyle(a) { let b = this.b4; if (OverlayTextUtil.q(a)) { a = OverlayTextUtil.c(); } this.b4 = a; if (b != this.b4) { this.a1("OverlayTextStyle", b, this.b4); } } } 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; })(); /** * @hidden */ export let UserSliceAnnotation = /*@__PURE__*/ (() => { class UserSliceAnnotation extends UserShapeAnnotation { constructor() { super(); this.k = 0; } } UserSliceAnnotation.$t = markType(UserSliceAnnotation, 'UserSliceAnnotation', UserShapeAnnotation.$); return UserSliceAnnotation; })(); /** * @hidden */ export let UserStripAnnotation = /*@__PURE__*/ (() => { class UserStripAnnotation extends UserShapeAnnotation { constructor() { super(); this.k = 1; } az(a) { super.az(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")) { let b = a.o("startValueDisplayMode"); let c = 0; if (((() => { let d = EnumUtil.tryParse$1(DataAnnotationDisplayMode_$type, b, true, c); c = d.p2; return d.ret; })())) { this.startValueDisplayMode = c; } } if (a.k("endValueDisplayMode")) { let d = a.o("endValueDisplayMode"); let e = 0; if (((() => { let f = EnumUtil.tryParse$1(DataAnnotationDisplayMode_$type, d, true, e); e = f.p2; return f.ret; })())) { this.endValueDisplayMode = e; } } } n() { let a = super.n(); if (!isNaN_(this.startValue)) { a.item("startValue", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = this.startValue; return $ret; })())); } if (this.startLabel != null) { a.item("startLabel", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = this.startLabel; return $ret; })())); } if (!isNaN_(this.endValue)) { a.item("endValue", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = this.endValue; return $ret; })())); } if (this.endLabel != null) { a.item("endLabel", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = this.endLabel; return $ret; })())); } if (this.startLabelColor != null) { a.item("startLabelColor", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = CSSColorUtil.c(this.startLabelColor); return $ret; })())); } if (this.endLabelColor != null) { a.item("endLabelColor", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = CSSColorUtil.c(this.endLabelColor); return $ret; })())); } if (this.startLabelBorderColor != null) { a.item("startLabelBorderColor", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = CSSColorUtil.c(this.startLabelBorderColor); return $ret; })())); } if (this.endLabelBorderColor != null) { a.item("endLabelBorderColor", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = CSSColorUtil.c(this.endLabelBorderColor); return $ret; })())); } if (this.startLabelBackground != null) { a.item("startLabelBackground", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = CSSColorUtil.c(this.startLabelBackground); return $ret; })())); } if (this.endLabelBackground != null) { a.item("endLabelBackground", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = CSSColorUtil.c(this.endLabelBackground); return $ret; })())); } if (this.startValueDisplayMode != 0) { a.item("startValueDisplayMode", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = EnumUtil.getName(DataAnnotationDisplayMode_$type, this.startValueDisplayMode); return $ret; })())); } if (this.endValueDisplayMode != 0) { a.item("endValueDisplayMode", ((() => { let $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; })();