igniteui-angular-charts
Version:
Ignite UI Angular charting components for building rich data visualizations for modern web apps.
957 lines (956 loc) • 35.4 kB
JavaScript
/*
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 { ScatterBase } from "./ScatterBase";
import { IScaleLegendSeries_$type } from "igniteui-angular-core";
import { ISupportsSizeScale_$type } from "./ISupportsSizeScale";
import { ISupportsFillScale_$type } from "./ISupportsFillScale";
import { Base, typeCast, Point_$type, fromEnum, markType, markDep, enumGetBox, runOn } from "igniteui-angular-core";
import { List$1 } from "igniteui-angular-core";
import { UIElement } from "igniteui-angular-core";
import { ActualRange } from "./ActualRange";
import { DependencyProperty } from "igniteui-angular-core";
import { SizeScale } from "./SizeScale";
import { BrushScale } from "./BrushScale";
import { ScatterFrame } from "./ScatterFrame";
import { IChartLegend_$type } from "igniteui-angular-core";
import { ValueBrushScale } from "./ValueBrushScale";
import { IFastItemsSource_$type } from "igniteui-angular-core";
import { ScatterBaseView } from "./ScatterBaseView";
import { ScalerParams } from "./ScalerParams";
import { Dictionary$2 } from "igniteui-angular-core";
import { OwnedPoint } from "./OwnedPoint";
import { BubbleMarkerManager } from "./BubbleMarkerManager";
import { IChartItemLegend_$type } from "igniteui-angular-core";
import { IChartScaleLegend_$type } from "igniteui-angular-core";
import { ContentControl } from "igniteui-angular-core";
import { DataContext } from "igniteui-angular-core";
import { DeviceUtils } from "igniteui-angular-core";
import { BrushUtil } from "igniteui-angular-core";
import { ChartSelection } from "./ChartSelection";
import { FastItemsSource } from "igniteui-angular-core";
import { FastItemColumn } from "igniteui-angular-core";
import { DataLegendSeriesValueInfo } from "igniteui-angular-core";
import { DataLegendSeriesContext } from "igniteui-angular-core";
import { PropertyMetadata } from "igniteui-angular-core";
import { isNaN_, isInfinity, logBase } from "igniteui-angular-core";
import { stringIsNullOrEmpty } from "igniteui-angular-core";
import { BrushSelectionMode_$type } from "./BrushSelectionMode";
import { ScatterTrendLineManager } from "./ScatterTrendLineManager";
import { Defaults } from "./Defaults";
/**
* @hidden
*/
export let BubbleSeries = /*@__PURE__*/ (() => {
class BubbleSeries extends ScatterBase {
constructor() {
super();
this.ae1 = null;
this.ae0 = null;
this.ado = null;
this.adf = null;
this.ade = null;
this.add = null;
this.adb = null;
this.ab = BubbleSeries.$;
this.zm = new ScatterFrame();
this.zo = new ScatterFrame();
this.zk = new ScatterFrame();
}
bk() {
return new BubbleSeries();
}
get_ek() {
return true;
}
ct() {
return new BubbleSeriesView(this);
}
rg(a) {
super.rg(a);
this.ada = a;
}
jt() {
return 0.7;
}
xl() {
if (this.xk == 0) {
return 2;
}
return super.xl();
}
isAttachedTo(a) {
return this.a5 == a;
}
ej() {
return true;
}
qf(a) {
super.qf(a);
if (this.adj != null && this.ado != null && this.ado.count > 0) {
for (let b = 0; b < this.ado.count; b++) {
a(this.ado._inner[b]);
}
}
}
get adi() {
return this.adk;
}
get_isColoredItemwise() {
return this.adg != null && this.adg.count > 0;
}
aez(a) {
let b = typeCast(CustomPaletteBrushScale.$, this.ac9);
let c = typeCast(ValueBrushScale.$, this.ac9);
let d = this.ac9;
if (b != null && this.dp != null) {
return b.getBrush1(a, this.dp.count);
}
else if (c != null) {
return c.getBrushByIndex(a, this.adg);
}
else if (d != null) {
return d.getBrush(a);
}
return null;
}
get legendReady() {
return this.adk != null && this.adk.count != 0;
}
get minScaleText() {
let a = this.ac8(this.adc).b;
return (Math.round(a * 1000) / 1000).toString();
}
get maxScaleText() {
let a = this.ac8(this.adc).a;
return (Math.round(a * 1000) / 1000).toString();
}
forScaleColors(a) {
for (let b = 0; b < this.adk.count; b++) {
if (this.ac9 == null || !this.ac9.isReady) {
return false;
}
let c = NaN;
if (this.adg != null) {
c = (this.adg.item(b) - this.adg.minimum) / (this.adg.maximum - this.adg.minimum);
}
let d = (this.adk.item(b) - this.adk.minimum) / (this.adk.maximum - this.adk.minimum);
if (isNaN_(c)) {
c = 0;
}
if (isNaN_(d)) {
d = c;
}
let e = this.y1;
let f = this.aez(b);
let g = f != null ? f : e;
a(g, d);
}
return true;
}
kz(a, b) {
let c = this.no(b);
if (c == BubbleSeries.$$p[5]) {
return this.k0(a, b, this.ad3);
}
if (c == BubbleSeries.$$p[11]) {
return this.k0(a, b, this.aed);
}
if (c == ScatterBase.$$p[12]) {
return this.k0(a, b, this.abd);
}
if (c == ScatterBase.$$p[16]) {
return this.k0(a, b, this.abl);
}
if (c == BubbleSeries.$$p[2]) {
return this.k0(a, b, this.ady);
}
return super.kz(a, b);
}
mo(a) {
let b = this.no(a);
if (b == BubbleSeries.$$p[5]) {
return this.ad3;
}
if (b == BubbleSeries.$$p[11]) {
return this.aed;
}
if (b == ScatterBase.$$p[12]) {
return this.abd;
}
if (b == ScatterBase.$$p[16]) {
return this.abl;
}
if (b == BubbleSeries.$$p[2]) {
return this.ady;
}
return super.mo(a);
}
get adk() {
return this.adf;
}
set adk(a) {
if (this.adf != a) {
let b = this.adk;
this.adf = a;
this.raisePropertyChanged("RadiusColumn", b, this.adk);
}
}
get adj() {
return this.ade;
}
set adj(a) {
if (this.ade != a) {
let b = this.adj;
this.ade = a;
this.raisePropertyChanged("LabelColumn", b, this.adj);
}
}
get adg() {
return this.add;
}
set adg(a) {
if (this.add != a) {
let b = this.adg;
this.add = a;
this.raisePropertyChanged("FillColumn", b, this.adg);
}
}
abo(a, b, c, d, e) {
if (c <= this.aat) {
b.j = new Dictionary$2(Base.$, OwnedPoint.$, 1, c);
}
let f = this.aat;
let g = this.dp;
let h;
let i;
let j = this.getEffectiveViewport1(a);
let k = new ScalerParams(0, d, e, this.zg.d, j);
let l = new ScalerParams(0, d, e, this.zg.e, j);
let m = false;
let n = 0;
if (this.dc != null) {
if (this.dc.g0()) {
let o = this.dc.oj(d, k);
m = o.c;
n = o.d;
}
}
for (let p = 0; p < c; p++) {
h = this.z1.item(p);
i = this.z2.item(p);
let q = { $type: Point_$type, x: this.zg.a.f5(h, k), y: this.zg.b.f5(i, l) };
if (m) {
if (q.x < e.left || q.x > e.right) {
if (q.x + n >= e.left && q.x + n <= e.right) {
q = { $type: Point_$type, x: q.x + n, y: i };
}
}
}
if (!isInfinity(q.x) && !isInfinity(q.y)) {
let r = g.item(p);
if (c <= f) {
if (!b.j.containsKey(r)) {
let s = { $type: Point_$type, x: h, y: i };
b.j.addItem(r, ((() => {
let $ret = new OwnedPoint();
$ret.a = r;
$ret.b = s;
$ret.c = q;
return $ret;
})()));
}
}
}
}
}
abz(a, b) {
let c = typeCast(BubbleSeriesView.$, b);
let d = c.dd;
d.m = this.adk;
super.abz(a, b);
let e = Math.min(this.z1 != null ? this.z1.count : 0, this.z2 != null ? this.z2.count : 0);
if (e < 1) {
return;
}
c.d0();
c.d1();
}
aei() {
if (this.dc == null) {
return;
}
if (this.a5 == null) {
return;
}
if (this.a5.isItemwise) {
let a = this.a5;
this.a5.clearLegendItemsForSeries(this);
this.aeh();
a.renderItemwiseContent(this);
}
if (this.a5.isScale) {
let b = this.a5;
b.restoreOriginalState();
b.initializeLegend(this);
}
}
static adp(a, b, c, d, e) {
if (e <= a || isNaN_(e) || isInfinity(e)) {
return c;
}
if (e >= b) {
return d;
}
let f = c + ((d - c) / (b - a)) * (e - a);
return f;
}
static adq(a, b, c, d, logBase_, e) {
let f = logBase(e, logBase_);
let g = logBase(a, logBase_);
let h = logBase(b, logBase_);
return BubbleSeries.adp(g, h, c, d, f);
}
hk(a, b, c) {
let d = super.hk(a, b, c);
if (this.adk == null || this.dp == null || this.adk.count == 0 || this.dp.count != this.adk.count) {
d = false;
}
return d;
}
aab(a, b) {
if (b != 3) {
return true;
}
if (a == null) {
return true;
}
if (this.abd == a || this.abl == a || this.aed == a) {
return true;
}
return false;
}
aeh() {
let a = typeCast(IChartLegend_$type, this.a5);
if (a == null || this.dp == null) {
return;
}
this.ado = new List$1(UIElement.$, 0);
let b = typeCast(CustomPaletteBrushScale.$, this.ac9);
let c = typeCast(ValueBrushScale.$, this.ac9);
let d = this.ac9;
let e = this.ac7();
let f = e.b;
let g = e.a;
let h = this.dp;
for (let i = 0; i < h.count; i++) {
let j = null;
if (c != null && this.adg != null) {
let k = this.adg.item(i);
j = c.getBrushByRange(k, f, g);
}
else if (b != null) {
j = b.getBrush1(i, h.count);
}
else if (d != null) {
j = d.getBrush(i);
}
let l = new ContentControl();
let m = this.adj != null && this.adj.item(i) != null ? this.adj.item(i).toString() : "";
l.content = ((() => {
let $ret = new DataContext();
$ret.series = this;
$ret.item = h.item(i);
$ret.itemBrush = j;
$ret.itemLabel = m;
$ret.legendLabel = m;
return $ret;
})());
let n = this.te;
if (n == null) {
n = this.cw.bz(this.c1);
}
l.ah = n;
this.ado.add(l);
}
}
pn(a, b, c, d) {
super.pn(a, b, c, d);
if (this.adc != null) {
this.adc.aa();
}
if (this.ac9 != null) {
this.ac9.x();
}
this.aei();
}
qr() {
super.qr();
this.aei();
}
qy() {
super.qy();
this.aei();
}
rp(a, b, c, d) {
super.rp(a, b, c, d);
switch (b) {
case ScatterBase.$$p[10]:
case ScatterBase.$$p[14]:
case ScatterBase.$$p[11]:
case ScatterBase.$$p[15]:
case BubbleSeries.$$p[9]:
case BubbleSeries.$$p[10]:
this.qt();
break;
case "FastItemsSource":
if (this.adc != null) {
this.adc.aa();
}
if (this.ac9 != null) {
this.ac9.x();
}
if (typeCast(IFastItemsSource_$type, c) != null) {
c.deregisterColumn(this.adk);
c.deregisterColumn(this.adg);
c.deregisterColumn(this.adj);
this.adk = null;
this.adg = null;
this.adj = null;
}
if (typeCast(IFastItemsSource_$type, d) != null) {
this.adk = this.dl(this.aed);
if (!stringIsNullOrEmpty(this.ady)) {
this.adg = this.dl(this.ady);
}
this.adj = this.dn(this.ad3);
}
this.r7(false);
this.aei();
break;
case BubbleSeries.$$p[11]:
if (this.adc != null) {
this.adc.aa();
}
if (this.dp != null) {
this.dp.deregisterColumn(this.adk);
this.adk = this.dl(this.aed);
this.aei();
}
break;
case "RadiusColumn":
if (this.adc != null) {
this.adc.aa();
}
this.zh.df.g$m();
this.r7(this.gm && this.d9);
this.q0();
break;
case BubbleSeries.$$p[12]:
if (c != null) {
c.l.remove(this);
c.aa();
}
if (d != null) {
d.l.add(this);
d.aa();
}
this.r7(false);
this.qz();
break;
case BubbleSeries.$$p[13]:
this.r7(false);
this.qz();
break;
case "DiscreteLegendItemTemplate":
this.aei();
break;
case BubbleSeries.$$p[3]:
if (c != null) {
c.o.remove(this);
c.x();
}
if (d != null) {
d.o.add(this);
d.x();
}
this.r7(false);
this.aei();
this.qz();
break;
case BubbleSeries.$$p[4]:
case BubbleSeries.$$p[8]:
case BubbleSeries.$$p[7]:
case BubbleSeries.$$p[6]:
this.r7(false);
this.aei();
this.qz();
break;
case "FillColumn":
this.r7(this.gm && this.d9);
this.qz();
break;
case BubbleSeries.$$p[2]:
if (this.ac9 != null) {
this.ac9.x();
}
if (this.dp != null) {
this.dp.deregisterColumn(this.adg);
this.adg = this.dl(this.ady);
this.aei();
}
break;
case BubbleSeries.$$p[5]:
if (this.dp != null) {
this.dp.deregisterColumn(this.adj);
this.adj = this.dn(this.ad3);
this.aei();
}
break;
case "ActualLegend":
let e = typeCast(IChartLegend_$type, c);
if (e != null && e.isItemwise) {
let f = typeCast(IChartItemLegend_$type, e);
f.clearLegendItemsForSeries(this);
}
if (e != null && e.isScale) {
let g = typeCast(IChartScaleLegend_$type, e);
let h = true;
let i = null;
if (this.dc != null) {
for (let j of fromEnum(this.dc.b9)) {
if (j.legend == g) {
i = j;
h = false;
}
}
}
if (h) {
g.restoreOriginalState();
}
else {
g.initializeLegend(typeCast(IScaleLegendSeries_$type, i));
}
}
this.aei();
break;
case "SeriesViewer":
this.aei();
break;
}
}
updateSizeScaleGlobals() {
let a = new ActualRange();
a.b = NaN;
a.a = NaN;
if (this.adk != null) {
a.b = this.adk.minimum;
a.a = this.adk.maximum;
}
if (this.adc != null) {
this.adc.ab(a.b, a.a);
}
}
updateFillScaleGlobals() {
let a = new ActualRange();
a.b = NaN;
a.a = NaN;
if (this.adg != null) {
a.b = this.adg.minimum;
a.a = this.adg.maximum;
}
if (this.ac9 != null) {
this.ac9.z(a.b, a.a);
}
}
ac8(a) {
let b = new ActualRange();
b.b = NaN;
b.a = NaN;
if (this.adk != null) {
b.b = this.adk.minimum;
b.a = this.adk.maximum;
}
if (a != null) {
a.x();
if (this.adn) {
b.b = a.globalMinimum;
b.a = a.globalMaximum;
}
}
return b;
}
ac7() {
let a = new ActualRange();
a.b = NaN;
a.a = NaN;
if (this.adg != null) {
a.b = this.adg.minimum;
a.a = this.adg.maximum;
}
let b = typeCast(ValueBrushScale.$, this.ac9);
if (b != null) {
b.s();
if (this.adl && this.ac9.o.count > 1) {
a.b = b.q;
a.a = b.p;
}
}
return a;
}
aek(a, b, c, d) {
let e = c.width;
if (!this.cw.b9.isEmpty) {
e = this.cw.b9.width;
}
else if (this.dc != null && !this.dc.y9.isEmpty) {
e = this.dc.y9.width;
}
let f = DeviceUtils.c(e);
this.adb = this.adc || ((() => {
let $ret = new SizeScale();
$ret.minimumValue = f / 10;
$ret.maximumValue = f / 5;
return $ret;
})());
if (this.adb != null) {
let g = this.adb.minimumValue;
let h = this.adb.maximumValue;
let i = this.adb.logarithmBase;
let j = this.ac8(this.adb);
let k = j.b;
let l = j.a;
if (this.adb.isLogarithmic) {
for (let m = 0; m < b.count; m++) {
b._inner[m] = BubbleSeries.adq(k, l, g, h, i, b._inner[m]);
}
}
else {
for (let n = 0; n < b.count; n++) {
b._inner[n] = BubbleSeries.adp(k, l, g, h, b._inner[n]);
}
}
}
let o = 1;
o = DeviceUtils.d();
let p = this.adc == null;
if (d) {
let q = c.width / e;
for (let r = 0; r < b.count; r++) {
if (p) {
b._inner[r] = b._inner[r] / o;
}
b._inner[r] = b._inner[r] * q;
}
}
for (let s = 0; s < a.count; s++) {
let t = a._inner[s];
if (p && !d) {
t.width = Math.max(0, b._inner[s] / o);
t.height = Math.max(0, b._inner[s] / o);
}
else {
t.width = Math.max(0, b._inner[s]);
t.height = Math.max(0, b._inner[s]);
}
}
}
aej(a) {
let b = typeCast(BubbleSeriesView.$, this.cv);
this.ada.ck = false;
if (b != null) {
b.ck = false;
}
let c = typeCast(CustomPaletteBrushScale.$, this.ac9);
let d = typeCast(ValueBrushScale.$, this.ac9);
let e = this.ac9;
let f = this.ac7();
let g = f.b;
let h = f.a;
let i = this.ac9 == null || !this.ac9.isReady || (d != null && this.ady == null);
if (i) {
this.ada.dz();
if (b != null) {
b.dz();
}
return;
}
this.ada.ck = true;
if (b != null) {
b.ck = true;
}
let j = a.count;
let k = this.dp;
for (let l = 0; l < j; l++) {
let m = a._inner[l];
let n = typeCast(DataContext.$, m.content);
if (n != null) {
let o = null;
let p = k.indexOf(n.item);
if (c != null) {
o = c.getBrush1(p, k.count);
}
else if (d != null && this.adg != null) {
let q = this.adg.item(p);
o = d.getBrushByRange(q, g, h);
}
else if (e != null) {
o = e.getBrush(p);
}
else {
if (this.y3 == null) {
o = this.y1;
}
else {
o = this.y3;
}
}
let r = null;
if (this.y4 == null) {
r = this.y2;
}
else {
r = this.y4;
}
if (this.adm && o != null) {
r = o;
}
if (r != null && !isNaN_(this.ads)) {
r = BrushUtil.o(r, this.ads);
}
if (o != null && !isNaN_(this.adr)) {
o = BrushUtil.o(o, this.adr);
}
n.itemBrush = o;
n.actualItemBrush = o;
n.outline = r;
}
}
}
ak(a, b) {
let c = new List$1(ChartSelection.$, 0);
this.qh(a, c, b);
return c.toArray();
}
qh(a, b, c) {
let d = 1;
if (d == 1) {
let e = this.adh();
this.abr(a, b, c, d, e);
}
else {
super.qh(a, b, c);
}
}
adh() {
let a = new FastItemColumn(typeCast(FastItemsSource.$, this.dp), "RadiusColumn", null, false);
let b = this.cw.b9;
let c = b.width;
if (!this.cw.b9.isEmpty) {
c = this.cw.b9.width;
}
else if (this.dc != null && !this.dc.y9.isEmpty) {
c = this.dc.y9.width;
}
let d = DeviceUtils.c(c);
this.adb = this.adc || ((() => {
let $ret = new SizeScale();
$ret.minimumValue = d / 10;
$ret.maximumValue = d / 5;
return $ret;
})());
if (this.adb != null) {
let e = this.adb.minimumValue;
let f = this.adb.maximumValue;
let g = this.adb.logarithmBase;
let h = this.ac8(this.adb);
let i = h.b;
let j = h.a;
if (this.adb.isLogarithmic) {
for (let k = 0; k < a.count; k++) {
a.item(k, BubbleSeries.adq(i, j, e, f, g, a.item(k)));
}
}
else {
for (let l = 0; l < a.count; l++) {
a.item(l, BubbleSeries.adp(i, j, e, f, a.item(l)));
}
}
}
let m = DeviceUtils.d();
let n = this.adc == null;
let o = this.cw == this.cv;
if (o) {
let p = b.width / c;
for (let q = 0; q < a.count; q++) {
if (n) {
a.item(q, a.item(q) / m);
}
a.item(q, a.item(q) * p);
}
}
for (let r = 0; r < a.count; r++) {
let s;
if (n && !o) {
a.item(r, Math.max(0, a.item(r) / m));
}
else {
a.item(r, Math.max(0, a.item(r)));
}
}
return a;
}
getDataLegendSeriesContextAt(a, b) {
let c = { $type: Point_$type, x: a, y: b };
let d = this.kw(c);
let e = d == null ? NaN : this.i4(d, "XMemberPath");
let f = d == null ? NaN : this.i4(d, "YMemberPath");
let g = new DataLegendSeriesValueInfo();
g.a = 13;
g.l = e;
g.q = "X";
g.r = this.abd != null ? this.abd : "X";
g.s = this.aa9 != null ? this.aa9 : "X:";
g.t = this.abb != null ? this.abb : "";
let h = new DataLegendSeriesValueInfo();
h.l = f;
h.a = 14;
h.q = "Y";
h.r = this.abl != null ? this.abl : "Y";
h.s = this.abh != null ? this.abh : "Y:";
h.t = this.abj != null ? this.abj : "";
let i = new DataLegendSeriesContext();
i.e = ((() => {
let $ret = new List$1(DataLegendSeriesValueInfo.$, 0);
$ret.add(g);
$ret.add(h);
return $ret;
})());
i.h = this.mn();
if (!stringIsNullOrEmpty(this.aed)) {
let j = d == null ? NaN : this.i4(d, "RadiusMemberPath");
let k = new DataLegendSeriesValueInfo();
k.l = j;
k.a = 11;
k.q = "Radius";
k.r = this.aed != null ? this.aed : "Radius";
k.s = this.ad9 != null ? this.ad9 : "R:";
k.t = this.aeb != null ? this.aeb : "";
i.e.add(k);
}
else if (this.adb != null) {
let l = new DataLegendSeriesValueInfo();
l.l = this.adb.maximumValue;
l.a = 11;
l.q = "Radius";
l.r = this.aed != null ? this.aed : "Radius";
l.s = this.ad9 != null ? this.ad9 : "R:";
l.t = this.aeb != null ? this.aeb : "";
i.e.add(l);
}
if (!stringIsNullOrEmpty(this.ady)) {
let m = d == null ? NaN : this.i4(d, "FillMemberPath");
let n = new DataLegendSeriesValueInfo();
n.l = m;
n.a = 12;
n.q = "Fill";
n.r = this.ady != null ? this.ady : "Fill";
n.s = this.adu != null ? this.adu : "F:";
n.t = this.adw != null ? this.adw : "";
i.e.add(n);
}
return i;
}
get actualMarkerBrush() {
return this.y1;
}
}
BubbleSeries.$t = markType(BubbleSeries, 'BubbleSeries', ScatterBase.$, [IScaleLegendSeries_$type, ISupportsSizeScale_$type, ISupportsFillScale_$type]);
BubbleSeries.$$p = markDep(DependencyProperty, PropertyMetadata, BubbleSeries, 'raisePropertyChanged', ['FillMemberAsLegendLabel:adu:ael', [2, null], 'FillMemberAsLegendUnit:adw:aem', [2, null], 'FillMemberPath:ady:aen', [2], 'FillScale:ac9:aeo', [BrushScale.$], 'FillScaleUseGlobalValues:adl:aep', [0, false], 'LabelMemberPath:ad3:aeq', [2], 'MarkerBrushBrightness:adr:aer', [1, NaN], 'MarkerOutlineBrightness:ads:aes', [1, NaN], 'MarkerOutlineUsesFillScale:adm:aet', [0, false], 'RadiusMemberAsLegendLabel:ad9:aeu', [2, null], 'RadiusMemberAsLegendUnit:aeb:aev', [2, null], 'RadiusMemberPath:aed:aew', [2, null], 'RadiusScale:adc:aex', [SizeScale.$], 'RadiusScaleUseGlobalValues:adn:aey', [0, false]]);
return BubbleSeries;
})();
/**
* @hidden
*/
export let CustomPaletteBrushScale = /*@__PURE__*/ (() => {
class CustomPaletteBrushScale extends BrushScale {
constructor() {
super();
}
getBrush1(a, b) {
if (this.brushes == null || this.brushes.count == 0) {
return null;
}
if (this.brushSelectionMode == 0) {
return super.getBrush(a % this.brushes.count);
}
let c = BubbleSeries.adp(0, b - 1, 0, this.brushes.count - 1, a);
return this.ab(c);
}
get_isReady() {
return this.brushes != null && this.brushes.count > 0;
}
}
CustomPaletteBrushScale.$t = markType(CustomPaletteBrushScale, 'CustomPaletteBrushScale', BrushScale.$);
CustomPaletteBrushScale.$$p = markDep(DependencyProperty, PropertyMetadata, CustomPaletteBrushScale, 'v', ['BrushSelectionMode', [BrushSelectionMode_$type, enumGetBox(BrushSelectionMode_$type, 0)]]);
return CustomPaletteBrushScale;
})();
/**
* @hidden
*/
export let BubbleSeriesView = /*@__PURE__*/ (() => {
class BubbleSeriesView extends ScatterBaseView {
constructor(a) {
super(a);
this.dy = null;
this.dy = a;
this.df = new ScatterTrendLineManager();
}
a4() {
super.a4();
if (!this.t) {
this.ch.xu = Defaults.e;
}
}
dc() {
return new BubbleMarkerManager((a) => this.dg.item(a), (a) => this.de.zg.c.item(a), runOn(this, this.ds), runOn(this, this.c9), runOn(this, this.dh));
}
d0() {
let a = this.dd;
this.dy.aek(a.n, a.o, this.b9, this == this.f.cv);
this.a2();
}
d1() {
let a = this.dd;
this.dy.aej(a.n);
}
dz() {
let a = this.dd;
for (let b of fromEnum(a.n)) {
let c = typeCast(DataContext.$, b.content);
if (c != null) {
c.itemBrush = null;
c.outline = null;
}
}
}
getDefaultTooltipTemplate() {
let a = "<div class='ui-chart-default-tooltip-content'><span";
let b = this.f.ba.a$v(this.f);
if (!stringIsNullOrEmpty(b)) {
a += " style='color:" + b + "'";
}
a += ">" + this.dy.title + "</span><br/><span>" + "(${item." + this.dy.abd + "}, ${item." + this.dy.abl + "})</span>";
if (!stringIsNullOrEmpty(this.dy.aed)) {
a += "<span>, Radius: ${item." + this.dy.aed + "}</span>";
}
a += "</div>";
return a;
}
}
BubbleSeriesView.$t = markType(BubbleSeriesView, 'BubbleSeriesView', ScatterBaseView.$);
return BubbleSeriesView;
})();