UNPKG

igniteui-angular-charts

Version:

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

1,395 lines 108 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 { Base, markType, INotifyPropertyChanged_$type, PropertyChangedEventArgs, Array_$type, enumGetBox, EnumUtil, typeGetValue, Number_$type, String_$type, fromEnum, typeCast, Date_$type, markDep, runOn, TypeRegistrar } from "igniteui-angular-core"; import { List$1 } from "igniteui-angular-core"; import { DataAbbreviationMode_$type } from "igniteui-angular-core"; import { Brush } from "igniteui-angular-core"; import { FontInfo } from "igniteui-angular-core"; import { Thickness } from "igniteui-angular-core"; import { Size } from "igniteui-angular-core"; import { Rect } from "igniteui-angular-core"; import { stringIsNullOrEmpty, stringEmpty, stringContains } from "igniteui-angular-core"; import { DataLegendSeriesContext } from "igniteui-angular-core"; import { LegendItemBadgeShape_$type } from "igniteui-angular-core"; import { Control } from "igniteui-angular-core"; import { IDataLegend_$type } from "igniteui-angular-core"; import { IOnDemandRender_$type } from "igniteui-angular-core"; import { DependencyProperty } from "igniteui-angular-core"; import { DataLegendValueMode_$type } from "igniteui-angular-core"; import { FontUtil } from "igniteui-angular-core"; import { DataLegendHeaderDateMode_$type } from "igniteui-angular-core"; import { DataLegendHeaderTimeMode_$type } from "igniteui-angular-core"; import { DataLegendSummaryType_$type } from "igniteui-angular-core"; import { DataLegendUnitsMode_$type } from "igniteui-angular-core"; import { DataLegendLabelMode_$type } from "igniteui-angular-core"; import { DataLegendLayoutMode_$type } from "igniteui-angular-core"; import { BindingFormatter } from "igniteui-angular-core"; import { DataLegendVisualData } from "./DataLegendVisualData"; import { Extensions } from "igniteui-angular-core"; import { TextBlock } from "igniteui-angular-core"; import { DataLegendVisualDataRow } from "./DataLegendVisualDataRow"; import { DataLegendVisualDataColumn } from "./DataLegendVisualDataColumn"; import { ILegendContext_$type } from "igniteui-angular-core"; import { AppearanceHelper } from "igniteui-angular-core"; import { RectData } from "igniteui-angular-core"; import { PrimitiveAppearanceData } from "igniteui-angular-core"; import { FrameworkElement } from "igniteui-angular-core"; import { DataLegendSummaryEventArgs } from "./DataLegendSummaryEventArgs"; import { DataLegendSummaryCalculationTotal } from "./DataLegendSummaryCalculationTotal"; import { DataLegendSummaryCalculationAverage } from "./DataLegendSummaryCalculationAverage"; import { DataLegendSummaryCalculationMin } from "./DataLegendSummaryCalculationMin"; import { DataLegendSummaryCalculationMax } from "./DataLegendSummaryCalculationMax"; import { DataLegendSummaryCalculationEmpty } from "./DataLegendSummaryCalculationEmpty"; import { DataLegendStylingRowEventArgs } from "./DataLegendStylingRowEventArgs"; import { DataLegendStylingColumnEventArgs } from "./DataLegendStylingColumnEventArgs"; import { Dictionary$2 } from "igniteui-angular-core"; import { IDataLegendSeries_$type } from "igniteui-angular-core"; import { BrushUtil } from "igniteui-angular-core"; import { DataLegendSeriesGroupInfo } from "./DataLegendSeriesGroupInfo"; import { RenderingContext } from "igniteui-angular-core"; import { DataLegendRenderContext } from "./DataLegendRenderContext"; import { Pool$1 } from "igniteui-angular-core"; import { ContentControl } from "igniteui-angular-core"; import { DataLegendSeriesValueInfo } from "igniteui-angular-core"; import { DataLegendColumn } from "./DataLegendColumn"; import { DataLegendSummaryColumn } from "igniteui-angular-core"; import { DataAbbreviator } from "./DataAbbreviator"; import { NumberFormatSpecifier } from "igniteui-angular-core"; import { DateTimeFormatSpecifier } from "igniteui-angular-core"; import { PropertyMetadata } from "igniteui-angular-core"; import { isNaN_, isInfinity, truncate } from "igniteui-angular-core"; import { EventProxy } from "igniteui-angular-core"; import { Tuple$2 } from "igniteui-angular-core"; import { CanvasViewRenderer } from "igniteui-angular-core"; import { DataTemplatePassInfo } from "igniteui-angular-core"; import { Rectangle } from "igniteui-angular-core"; import { DataTemplateMeasureInfo } from "igniteui-angular-core"; import { DataTemplateRenderInfo } from "igniteui-angular-core"; import { FontDefaults } from "igniteui-angular-core"; /** * @hidden */ export let DataLegendContent = /*@__PURE__*/ (() => { class DataLegendContent extends Base { constructor() { super(...arguments); this.a = new List$1(DataLegendRowInfo.$, 0); this.d = 0; this.c = 0; } get b() { return this.a; } f() { this.b.clear(); } e(a) { this.b.add(a); } } DataLegendContent.$t = markType(DataLegendContent, 'DataLegendContent'); return DataLegendContent; })(); /** * @hidden */ export let DataLegendRowBase = /*@__PURE__*/ (() => { class DataLegendRowBase extends Base { constructor(a, b, c, d, e) { super(); this.g = 0; this.c = false; this.e = false; this.a = false; this.b = false; this.d = false; this.f = false; this.g = e; this.e = b; this.b = c; this.a = d; this.d = !c && !b && !d; this.c = true; this.f = false; } } DataLegendRowBase.$t = markType(DataLegendRowBase, 'DataLegendRowBase'); return DataLegendRowBase; })(); /** * @hidden */ export let DataLegendRowCell = /*@__PURE__*/ (() => { class DataLegendRowCell extends DataLegendRowBase { constructor(a, b, c, d, e) { super(a, b, c, d, e); this.u = 0; this.h = 0; this.t = 0; this.y = null; this.x = null; this.v = null; this.z = null; this.w = null; this.ab = null; this.ac = null; this.ad = null; this.i = null; this.k = null; this.j = null; this.an = null; this.ap = null; this.ao = null; this.ai = new Size(); this.am = new Size(); this.ak = new Size(); this.o = false; this.l = false; this.ae = null; this.ag = null; this.af = null; this.ah = new Size(); this.al = new Size(); this.aj = new Size(); this.t = NaN; this.an = new Thickness(0, 0); this.ap = new Thickness(0, 0); this.ao = new Thickness(0, 0); this.ai = new Size(1, 0, 0); this.am = new Size(1, 0, 0); this.ak = new Size(1, 0, 0); this.o = true; this.l = true; if (this.d) { this.ab = a.bw(); this.ad = a.by(); this.ac = a.bx(); this.i = a.l(); this.k = a.p(); this.j = a.o(); } else if (this.e) { let f = a.bv(); let g = a.m(); this.ab = f; this.ad = f; this.ac = f; this.i = g; this.k = g; this.j = g; } else if (this.a) { let h = a.bs(); let i = a.j(); this.ab = h; this.ad = h; this.ac = h; this.i = i; this.k = i; this.j = i; } else { let j = a.bt(); let k = a.k(); this.ab = j; this.ad = j; this.ac = j; this.i = k; this.k = k; this.j = k; } this.ae = Rect.empty; this.ag = Rect.empty; this.af = Rect.empty; } m() { return this.ai.width > 0 && this.ai.height > 0; } p() { return this.ak.width > 0 && this.ak.height > 0; } r() { return this.am.width > 0 && this.am.height > 0; } n() { return this.v != null; } q() { return this.w != null; } s() { return !stringIsNullOrEmpty(this.z) && this.am.width > 0 && this.am.height > 0; } aa() { this.ah = new Size(1, 0, 0); this.al = new Size(1, 0, 0); this.aj = new Size(1, 0, 0); } } DataLegendRowCell.$t = markType(DataLegendRowCell, 'DataLegendRowCell', DataLegendRowBase.$); return DataLegendRowCell; })(); /** * @hidden */ export let DataLegendRowInfo = /*@__PURE__*/ (() => { class DataLegendRowInfo extends DataLegendRowBase { constructor(a, b, c, d, e) { super(a, b, c, d, e); this.m = null; this.l = false; this.q = null; this.h = null; this.i = null; this.r = null; this.u = null; this.k = null; this.y = new Size(); this.ab = null; this.p = null; this.t = null; this.x = new Size(); this.n = null; this.j = 0; this.o = null; this.aa = null; this.z = null; this.v = null; this.w = null; this.h = new Array(0); this.m = new List$1(DataLegendRowCell.$, 0); this.l = this.d; this.aa = new Thickness(0, 0); this.z = new Thickness(0, 0); this.ab = new Thickness(0, 0); this.x = new Size(1, 0, 0); this.y = new Size(1, 0, 0); if (this.d) { this.u = a.bw(); this.k = a.n(); } else if (this.e) { let f = a.bv(); let g = a.m(); this.u = f; this.k = g; } else if (this.a) { let h = a.bs(); let i = a.j(); this.u = h; this.k = i; } else { let j = a.bt(); let k = a.k(); this.u = j; this.k = k; } this.w = Rect.empty; this.v = Rect.empty; this.j = 7; this.o = "None"; } s(a) { if (this.m == null) { return; } for (let b = 0; b < this.m.count; b++) { a(this.m._inner[b]); } } } DataLegendRowInfo.$t = markType(DataLegendRowInfo, 'DataLegendRowInfo', DataLegendRowBase.$); return DataLegendRowInfo; })(); /** * @hidden */ export let XamDataLegend = /*@__PURE__*/ (() => { class XamDataLegend extends Control { constructor() { super(); this.b0 = false; this.cn = NaN; this.co = NaN; this.cp = 1; this.jt = new Thickness(0, 0); this.i9 = BrushUtil.j(0, 255, 255, 255); this.i8 = BrushUtil.j(0, 255, 255, 255); this.b1 = false; this.bm = null; this.be = null; this.bd = null; this.bh = null; this.bj = null; this.bg = null; this.bi = null; this.a9 = null; this.bl = null; this.bk = null; this.b7 = false; this.bf = null; this.cq = NaN; this.calculateColumnSummary = null; this.styleHeaderRow = null; this.styleGroupRow = null; this.styleSeriesRow = null; this.styleSummaryRow = null; this.styleSeriesColumn = null; this.styleSummaryColumn = null; this.propertyChanged = null; this.ce = null; this.cd = null; this.ch = null; this.cg = null; this.a7 = null; this.jm = null; this._externalObject = null; this.by = false; this.bz = false; this.cm = null; this.cf = new Dictionary$2(String_$type, DataLegendSeriesGroupInfo.$, 0); this.cj = new List$1(String_$type, 0); this.ao = new DataLegendContent(); this.cy = 0; this.ak = null; this.al = null; this.c4 = ""; this.ai = null; this.aj = null; this.jm = Rect.empty; this.b1 = true; this.ab = XamDataLegend.$; this.gt(); this.gu(); this.gv(); this.a7 = this.a6(); } get cr() { return this.cn; } set cr(a) { let b = this.cn; this.cn = a; if (b != this.cn) { this.gj("ActualCursorPositionX", b, this.cn); } } get cs() { return this.co; } set cs(a) { let b = this.co; this.co = a; if (b != this.co) { this.gj("ActualCursorPositionY", b, this.co); } } get ct() { return this.cp; } set ct(a) { let b = this.cp; this.cp = a; this.gj("ActualPixelScalingRatio", b, this.cp); } gv() { if (isNaN_(this.cw)) { this.jr = this.jt; } else { if (this.cw > 0) { this.jr = new Thickness(0, this.cw); } else { this.jr = this.jt; } } } gu() { if (this.i7 == null) { this.i5 = this.i9; } else { this.i5 = this.i7; } } gt() { if (this.i6 == null) { this.i4 = this.i8; } else { this.i4 = this.i6; } } get bx() { return this.bm; } set bx(a) { let b = this.bm; if (typeof a === 'string') { a = FontUtil.getFontInfoFromString(this.a7.al, a); } else if (a == null || a.c()) { a = this.a7.p(); } this.bm = a; if (b != this.bm) { this.gj("ValueTextStyle", b, this.bm); } } get bp() { return this.be; } set bp(a) { let b = this.be; if (typeof a === 'string') { a = FontUtil.getFontInfoFromString(this.a7.al, a); } else if (a == null || a.c()) { a = this.a7.k(); } this.be = a; if (b != this.be) { this.gj("HeaderTextStyle", b, this.be); } } get bo() { return this.bd; } set bo(a) { let b = this.bd; if (typeof a === 'string') { a = FontUtil.getFontInfoFromString(this.a7.al, a); } else if (a == null || a.c()) { a = this.a7.j(); } this.bd = a; if (b != this.bd) { this.gj("GroupTextStyle", b, this.bd); } } get bs() { return this.bh; } set bs(a) { let b = this.bh; if (typeof a === 'string') { a = FontUtil.getFontInfoFromString(this.a7.al, a); } else if (a == null || a.c()) { a = this.a7.m(); } this.bh = a; if (b != this.bh) { this.gj("SummaryTitleTextStyle", b, this.bh); } } get bu() { return this.bj; } set bu(a) { let b = this.bj; if (typeof a === 'string') { a = FontUtil.getFontInfoFromString(this.a7.al, a); } else if (a == null || a.c()) { a = this.a7.p(); } this.bj = a; if (b != this.bj) { this.gj("SummaryValueTextStyle", b, this.bj); } } get br() { return this.bg; } set br(a) { let b = this.bg; if (typeof a === 'string') { a = FontUtil.getFontInfoFromString(this.a7.al, a); } else if (a == null || a.c()) { a = this.a7.l(); } this.bg = a; if (b != this.bg) { this.gj("SummaryLabelTextStyle", b, this.bg); } } get bt() { return this.bi; } set bt(a) { let b = this.bi; if (typeof a === 'string') { a = FontUtil.getFontInfoFromString(this.a7.al, a); } else if (a == null || a.c()) { a = this.a7.o(); } this.bi = a; if (b != this.bi) { this.gj("SummaryUnitsTextStyle", b, this.bi); } } get bw() { return this.bl; } set bw(a) { let b = this.bl; if (typeof a === 'string') { a = FontUtil.getFontInfoFromString(this.a7.al, a); } else if (a == null || a.c()) { a = this.a7.o(); } this.bl = a; if (b != this.bl) { this.gj("UnitsTextStyle", b, this.bl); } } get bv() { return this.bk; } set bv(a) { let b = this.bk; if (typeof a === 'string') { a = FontUtil.getFontInfoFromString(this.a7.al, a); } else if (a == null || a.c()) { a = this.a7.n(); } this.bk = a; if (b != this.bk) { this.gj("TitleTextStyle", b, this.bk); } } get bq() { return this.bf; } set bq(a) { let b = this.bf; if (typeof a === 'string') { a = FontUtil.getFontInfoFromString(this.a7.al, a); } else if (a == null || a.c()) { a = this.a7.l(); } this.bf = a; if (b != this.bf) { this.gj("LabelTextStyle", b, this.bf); } } get pixelScalingRatio() { return this.cq; } set pixelScalingRatio(a) { let b = this.cq; this.cq = a; this.gj("PixelScalingRatio", b, this.cq); } exportSerializedVisualData() { let a = this.exportVisualData(); return a.serialize(); } cv(a, b) { let c = Math.max(b.left, a); let d = Math.max(b.right, a); let e = Math.max(b.right, a); return Math.min(b.top, a); } cu(a, b) { return Math.min(b.left, a); } jl(a, b) { let c = Rect.l_op_Equality(a, null) || a.isEmpty || !Extensions.b(a); let d = Rect.l_op_Equality(b, null) || b.isEmpty || !Extensions.b(b); if (c) { return b; } if (d) { return a; } if (c && c) { return Rect.empty; } let e = Math.min(a.top, b.top); let f = Math.min(a.left, b.left); let g = Math.max(a.right, b.right); let h = Math.max(a.bottom, b.bottom); return new Rect(0, f, e, g - f, h - e); } exportVisualData() { let a = new DataLegendVisualData(); a.width = this.ao.d; a.height = this.ao.c; a.background = AppearanceHelper.b(this.i4); a.borderBrush = AppearanceHelper.b(this.i5); if (this.jr != null) { a.borderThicknessTop = this.jr.top; a.borderThicknessLeft = this.jr.left; a.borderThicknessRight = this.jr.right; a.borderThicknessBottom = this.jr.bottom; } if (this.a7 == null) { return a; } let b = -1; let c = -1; let d = -1; let e = -1; let f = this.a7.af; let g = this.a7.ad; let h = this.a7.ah; let i = this.a7.ag; if (Rect.l_op_Equality(this.jm, null) || this.jm.isEmpty) { a.viewport = null; } else { a.viewport = new RectData(0, 0, this.jm.width, this.jm.height); } for (let j = 0; j < this.ao.b.count; j++) { let k = this.ao.b._inner[j]; let l = new DataLegendVisualDataRow(); l.seriesIndex = k.g; l.rowMarginTop = k.aa.top; l.rowMarginBottom = k.aa.bottom; l.rowMarginRight = k.aa.right; l.rowMarginLeft = k.aa.left; let m = Rect.empty; if (k.c) { if (Extensions.b(k.w) && f.count > (b + 1)) { b++; let n = f._inner[b]; let o = this.bn(n, k.k); let p = new DataLegendVisualDataColumn(); p.bounds = RectData.b(k.w); p.text = n.al; p.textColor = AppearanceHelper.b(k.u); p.marginTop = k.ab.top; p.marginLeft = k.ab.left; p.marginRight = k.ab.right; p.marginBottom = k.ab.bottom; this.gw(p, o); l.columns.add(p); m = this.jl(m, k.w); } for (let q of fromEnum(k.m)) { if (Extensions.b(q.ae) && g.count > (c + 1)) { c++; let r = g._inner[c]; let s = this.bn(r, q.i); let t = new DataLegendVisualDataColumn(); t.bounds = RectData.b(q.ae); t.text = r.al; t.textColor = AppearanceHelper.b(q.ab); t.marginTop = q.an.top; t.marginLeft = q.an.left; t.marginRight = q.an.right; t.marginBottom = q.an.bottom; this.gw(t, s); l.columns.add(t); m = this.jl(m, q.ae); } if (Extensions.b(q.ag) && h.count > (d + 1)) { d++; let u = h._inner[d]; let v = this.bn(u, q.k); let w = new DataLegendVisualDataColumn(); w.bounds = RectData.b(q.ag); w.text = u.al; w.textColor = AppearanceHelper.b(q.ad); w.marginTop = q.ap.top; w.marginLeft = q.ap.left; w.marginRight = q.ap.right; w.marginBottom = q.ap.bottom; this.gw(w, v); l.columns.add(w); m = this.jl(m, q.ag); } if (Extensions.b(q.af) && i.count > (e + 1)) { e++; let x = i._inner[e]; let y = this.bn(x, q.j); let z = new DataLegendVisualDataColumn(); z.bounds = RectData.b(q.af); z.text = q.o ? q.w : null; z.textColor = AppearanceHelper.b(q.ac); z.marginTop = q.ao.top; z.marginLeft = q.ao.left; z.marginRight = q.ao.right; z.marginBottom = q.ao.bottom; this.gw(z, y); l.columns.add(z); m = this.jl(m, q.af); } } if (k.l) { m = this.jl(m, k.v); l.badgeBounds = RectData.b(k.v); l.badgeMarginTop = k.z.top; l.badgeMarginBottom = k.z.bottom; l.badgeMarginRight = k.z.right; l.badgeMarginLeft = k.z.left; l.badgeAppearance = new PrimitiveAppearanceData(); let aa = typeCast(ILegendContext_$type, k.n); let ab = typeCast(ILegendContext_$type, k.i); l.badgeAppearance.fill = AppearanceHelper.b(aa.actualItemBrush); l.badgeAppearance.stroke = AppearanceHelper.b(aa.outline); l.badgeShape = k.o; } l.rowBounds = RectData.b(m); } a.rows.add(l); } return a; } gw(a, b) { if (b != null) { if (b.q != null) { a.fontFamily = b.q; } if (!isNaN_(b.f)) { a.fontSize = b.f; } a.fontWeight = stringIsNullOrEmpty(b.v) ? "Normal" : b.v; a.fontStyle = stringIsNullOrEmpty(b.t) ? "Normal" : b.t; if (b.r != null) { a.fontStretch = b.t; } } } bn(a, b) { let c = a.dataContext; if (c != null) { b = a.dataContext; } if (b == null || stringIsNullOrEmpty(b.fontString)) { return b; } else { return FontUtil.toFontInfo(this.a7.al, b.fontString); } } a2(a) { if (this.calculateColumnSummary != null) { let b = new DataLegendSummaryEventArgs(a.a, a.d); b.summaryValue = a.c; this.calculateColumnSummary(this, b); a.c = b.summaryValue; a.f = b.summaryUnits; a.e = b.summaryLabel; } return a; } a8() { switch (this.a3) { case 0: case 1: return new DataLegendSummaryCalculationTotal(); case 2: return new DataLegendSummaryCalculationAverage(); case 3: return new DataLegendSummaryCalculationMin(); case 4: return new DataLegendSummaryCalculationMax(); case 5: return new DataLegendSummaryCalculationEmpty(); default: return new DataLegendSummaryCalculationEmpty(); } } g1(a) { if (this.styleSummaryRow != null) { let b = this.a0(a); this.styleSummaryRow(this, b); this.gx(a, b); } if (a.c && a.m != null && this.styleSummaryColumn != null) { for (let c = 0; c < a.m.count; c++) { let d = this.az(a.m._inner[c]); d.d = a.g; d.g = a.q; d.c = c; d.e = a.p; this.styleSummaryColumn(this, d); this.g2(a.m._inner[c], d); } } } g0(a) { if (this.styleSeriesRow != null) { let b = this.a0(a); this.styleSeriesRow(this, b); this.gx(a, b); } if (a.c && a.m != null && this.styleSeriesColumn != null) { for (let c = 0; c < a.m.count; c++) { let d = this.az(a.m._inner[c]); d.d = a.g; d.g = a.q; d.c = c; d.e = a.p; this.styleSeriesColumn(this, d); this.g2(a.m._inner[c], d); } } } gz(a) { if (this.styleHeaderRow != null) { let b = this.a0(a); this.styleHeaderRow(this, b); this.gx(a, b); } } gy(a) { if (this.styleGroupRow != null) { let b = this.a0(a); this.styleGroupRow(this, b); this.gx(a, b); } } a0(a) { let b = new DataLegendStylingRowEventArgs(); b.g = a.r; b.h = a.u; b.e = a.p; b.a = a.j; b.b = a.l; b.c = a.c; b.d = a.g; b.f = a.q; return b; } gx(a, b) { a.r = b.g; a.u = b.h; a.j = b.a; a.l = b.b; a.c = b.c; } az(a) { let b = new DataLegendStylingColumnEventArgs(); b.f = a.v; b.l = a.ab; b.h = a.w; b.m = a.ac; b.k = a.z; b.n = a.ad; b.b = a.t; b.j = a.y; b.i = a.x; b.a = a.h; return b; } g2(a, b) { a.ab = b.l; a.v = b.f; a.l = !stringIsNullOrEmpty(a.v); a.w = b.h; a.ac = b.m; a.o = !stringIsNullOrEmpty(a.w); a.z = b.k; a.ad = b.n; } gm(a, b, c) { switch (a) { case XamDataLegend.$$p[5]: this.gt(); break; case XamDataLegend.$$p[6]: this.gv(); this.gu(); break; case XamDataLegend.$$p[7]: this.gv(); break; case XamDataLegend.$$p[31]: this.b1 = c; break; case XamDataLegend.$$p[25]: case XamDataLegend.$$p[9]: this.g6(); break; case XamDataLegend.$$p[24]: case XamDataLegend.$$p[8]: this.g5(); break; case XamDataLegend.$$p[44]: let d = c; let e = b; this.gk(e, d); break; case XamDataLegend.$$p[42]: if (this.b6(this.targetCursorPositionX)) { this.cr = this.targetCursorPositionX; } break; case XamDataLegend.$$p[43]: if (this.b6(this.targetCursorPositionY)) { this.cs = this.targetCursorPositionY; } break; case XamDataLegend.$$p[58]: case XamDataLegend.$$p[57]: if (!stringIsNullOrEmpty(this.fo)) { this.ak = ((() => { let $ret = new BindingFormatter(); $ret.j = this.fo; $ret.d = this.ah; return $ret; })()); } else { this.ak = null; } break; case XamDataLegend.$$p[17]: case XamDataLegend.$$p[16]: if (!stringIsNullOrEmpty(this.dv)) { this.ai = ((() => { let $ret = new BindingFormatter(); $ret.j = this.dv; $ret.d = this.ag; return $ret; })()); } else { this.ai = null; } break; case "PixelScalingRatio": if (isNaN_(this.ct)) { this.a7.ay(); } else { this.ct = this.pixelScalingRatio; } break; case "ActualPixelScalingRatio": this.a7.a9(c); break; } this.go(); } gj(a, b, c) { this.gm(a, b, c); if (this.propertyChanged != null) { this.propertyChanged(this, new PropertyChangedEventArgs(a)); } } gk(a, b) { this.a9 = b; if (a != null) { a.detachDataLegend(this); } if (b != null) { b.attachDataLegend(this); if (isNaN_(this.targetCursorPositionX)) { this.cr = -1; } if (isNaN_(this.targetCursorPositionY)) { this.cs = -1; } } } g6() { this.ch = this.ci(this.includedSeries); this.cg = this.ci(this.excludedSeries); } g5() { this.ce = this.ci(this.includedColumns); this.cd = this.ci(this.excludedColumns); if (this.ce != null) { let a = new List$1(String_$type, 1, this.ce.keys); for (let b of fromEnum(a)) { let c = b + ":"; let d = this.ce.item(b); if (!this.ce.containsKey(c)) { this.ce.addItem(c, d); } } this.f0(this.ce); } if (this.cd != null) { let e = new List$1(String_$type, 1, this.cd.keys); for (let f of fromEnum(e)) { let g = f + ":"; let h = this.cd.item(f); if (!this.cd.containsKey(g)) { this.cd.addItem(g, h); } } this.f0(this.cd); } } f0(a) { let b = new List$1(String_$type, 1, a.keys); for (let c of fromEnum(b)) { let d = a.item(c); let e = c.toLowerCase(); if (!a.containsKey(e)) { a.addItem(e, d); } let f = c.toUpperCase(); if (!a.containsKey(f)) { a.addItem(f, d); } if (c.length > 0) { let g = f.substr(0, 1) + e.substr(1); if (!a.containsKey(g)) { a.addItem(g, d); } } } } ci(a) { if (a == null) { return null; } let b = new Dictionary$2(String_$type, Number_$type, 0); for (let c = 0; c < a.length; c++) { let d = a[c]; if (!stringIsNullOrEmpty(d) && !b.containsKey(d.trim())) { b.addItem(d.trim(), b.count); } } return b; } b6(a) { return a >= 0 && a <= 1; } notifyCursorPositionChanged(a) { let b = !isNaN_(this.targetCursorPositionX) || !isNaN_(this.targetCursorPositionY); let c = !isNaN_(a.x) && this.b6(a.x); let d = !isNaN_(a.y) && this.b6(a.y); if (!b && c && d) { this.cr = a.x; this.cs = a.y; } } notifySizeChanged() { this.a7.a7(); } notifyVisualPropertiesChanged(a) { } notifySeriesCollectionChanged() { this.go(); } notifySeriesDataChanged() { if (this.b1) { this.go(); } } updatePropertyByName(a, b) { switch (a) { case XamDataLegend.$$p[26]: this.isEmbeddedInDataTooltip = b; break; case XamDataLegend.$$p[25]: this.includedSeries = b; break; case XamDataLegend.$$p[9]: this.excludedSeries = b; break; case XamDataLegend.$$p[24]: this.includedColumns = b; break; case XamDataLegend.$$p[8]: this.excludedColumns = b; break; case XamDataLegend.$$p[51]: this.an = EnumUtil.getEnumValue(DataAbbreviationMode_$type, b); break; case XamDataLegend.$$p[54]: this.c0 = typeGetValue(b); break; case XamDataLegend.$$p[55]: this.c1 = typeGetValue(b); break; case XamDataLegend.$$p[56]: this.a5 = EnumUtil.getEnumValue(DataLegendValueMode_$type, b); break; case XamDataLegend.$$p[52]: this.fg = b; break; case XamDataLegend.$$p[59]: this.ca = b; break; case XamDataLegend.$$p[58]: this.fo = b; break; case XamDataLegend.$$p[57]: this.ah = b; break; case XamDataLegend.$$p[60]: this.j4 = b; break; case XamDataLegend.$$p[61]: this.cb = b; break; case XamDataLegend.$$p[65]: this.fx = b; break; case XamDataLegend.$$p[64]: this.cc = b; break; case XamDataLegend.$$p[63]: this.j5 = b; break; case XamDataLegend.$$p[62]: this.jk = b; break; case "ValueTextStyle": this.bx = b; break; case XamDataLegend.$$p[17]: this.dv = b; break; case XamDataLegend.$$p[16]: this.ag = b; break; case XamDataLegend.$$p[14]: this.dr = b; break; case XamDataLegend.$$p[15]: this.ap = EnumUtil.getEnumValue(DataLegendHeaderDateMode_$type, b); break; case XamDataLegend.$$p[18]: this.aq = EnumUtil.getEnumValue(DataLegendHeaderTimeMode_$type, b); break; case XamDataLegend.$$p[23]: this.d0 = b; break; case XamDataLegend.$$p[21]: this.jb = b; break; case XamDataLegend.$$p[22]: this.jx = b; break; case XamDataLegend.$$p[19]: this.jw = b; break; case XamDataLegend.$$p[20]: this.b5 = b; break; case "HeaderTextStyle": this.bp = b; break; case XamDataLegend.$$p[12]: this.ja = b; break; case XamDataLegend.$$p[13]: this.jv = b; break; case XamDataLegend.$$p[10]: this.ju = b; break; case XamDataLegend.$$p[11]: this.b3 = b; break; case "GroupTextStyle": this.bo = b; break; case XamDataLegend.$$p[35]: this.jf = b; break; case "SummaryTitleTextStyle": this.bs = b; break; case XamDataLegend.$$p[38]: this.a3 = EnumUtil.getEnumValue(DataLegendSummaryType_$type, b); break; case XamDataLegend.$$p[37]: this.er = b; break; case XamDataLegend.$$p[36]: this.j0 = b; break; case XamDataLegend.$$p[34]: this.jz = b; break; case XamDataLegend.$$p[41]: this.jh = b; break; case "SummaryValueTextStyle": this.bu = b; break; case XamDataLegend.$$p[33]: this.em = b; break; case XamDataLegend.$$p[32]: this.je = b; break; case "SummaryLabelTextStyle": this.br = b; break; case XamDataLegend.$$p[40]: this.ex = b; break; case XamDataLegend.$$p[39]: this.jg = b; break; case "SummaryUnitsTextStyle": this.bt = b; break; case XamDataLegend.$$p[3]: this.js = b; break; case XamDataLegend.$$p[4]: this.ba = EnumUtil.getEnumValue(LegendItemBadgeShape_$type, b); break; case XamDataLegend.$$p[47]: this.a4 = EnumUtil.getEnumValue(DataLegendUnitsMode_$type, b); break; case XamDataLegend.$$p[50]: this.fa = b; break; case XamDataLegend.$$p[48]: this.jj = b; break; case XamDataLegend.$$p[49]: this.j2 = b; break; case "UnitsTextStyle": this.bw = b; break; case XamDataLegend.$$p[46]: this.j1 = b; break; case XamDataLegend.$$p[45]: this.ji = b; break; case "TitleTextStyle": this.bv = b; break; case XamDataLegend.$$p[27]: this.ar = EnumUtil.getEnumValue(DataLegendLabelMode_$type, b); break; case XamDataLegend.$$p[28]: this.jc = b; break; case XamDataLegend.$$p[29]: this.b7 = true; this.jy = b; break; case XamDataLegend.$$p[30]: this.as = EnumUtil.getEnumValue(DataLegendLayoutMode_$type, b); break; case "LabelTextStyle": this.bq = b; break; } } a6() { return new DataLegendView(this); } destroy() { this.provideContainer(null); } get externalObject() { return this._externalObject; } set externalObject(a) { this._externalObject = a; } flush() { this.a7.av(); } onAttachedToUI() { this.a7.a5(); } onDetachedFromUI() { this.a7.a8(); } ensureIndirectContainer(a, b) { if (this.a7.al == null) { this.a7.a6(a, true); } } provideContainer(a) { this.a7.a6(a, false); } go() { if (this.by) { return; } if (this.a7 != null) { this.by = this.a7.aa(); } } get shouldOnDemandRender() { return this.bz; } set shouldOnDemandRender(a) { this.bz = a; } doRender(a, b) { if (this.jm.isEmpty) { let c = this.getDesiredSize(); this.jm = new Rect(0, 0, 0, c.width, c.height); } this.gp(true); this.a7.bb(a, b); } ensureUpdated() { let a = this.getDesiredSize(); } f9() { if (!this.by) { if (this.ao == null) { this.go(); } else { return; } } this.g4(); } getDesiredSize() { this.f9(); if (this.ao == null) { return new Size(1, 0, 0); } return new Size(1, this.ao.d, this.ao.c); } g4() { this.f6(); if (this.a9 == null || this.a9.isDetached || !this.b4()) { return; } let a = this.a9; let b = a.getDataLegendSeries(); this.ga(b); this.fz(b, ""); this.cm = new List$1(String_$type, 0); for (let c of fromEnum(this.cj)) { let d = this.cf.item(c); this.gd(d); for (let e of fromEnum(d.b)) { if (!this.cm.contains(e.h) && !stringContains(e.h, "Highlight") && !stringContains(e.h, "Overlay") && !stringContains(e.h, "Value Layer")) { this.cm.add(e.h); } } } for (let f of fromEnum(this.cj)) { let g = this.cf.item(f); if (g.c.count > 0) { this.gc(g); } } this.b0 = this.b8(); this.f5(this.ao); } ga(a) { let b = new Dictionary$2(Number_$type, List$1.$.specialize(IDataLegendSeries_$type), 0); for (let c = 0; c < a.length; c++) { if (!this.isEmbeddedInDataTooltip) { if (a[c].legendItemVisibility != 0) { continue; } } let d = a[c].title == null ? null : a[c].title.toString(); let e = this.ch == null || this.ch.containsKey(a[c].dataLegendKey) || this.ch.containsKey(a[c].parentKey) || this.ch.containsKey(a[c].parentTitle) || this.ch.containsKey(a[c].index.toString()) || this.ch.containsKey(a[c].group) || this.ch.containsKey(d); let f = this.cg != null && (this.cg.containsKey(a[c].dataLegendKey) || this.cg.containsKey(a[c].parentKey) || this.cg.containsKey(a[c].parentTitle) || this.cg.containsKey(a[c].index.toString()) || this.cg.containsKey(a