igniteui-react-charts
Version:
Ignite UI React charting components for building rich data visualizations using TypeScript APIs.
1,038 lines (1,037 loc) • 36.1 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 { __extends, __values } from "tslib";
import { ScatterBase } from "./ScatterBase";
import { IScaleLegendSeries_$type } from "igniteui-react-core";
import { ISupportsSizeScale_$type } from "./ISupportsSizeScale";
import { ISupportsFillScale_$type } from "./ISupportsFillScale";
import { Base, typeCast, Point_$type, fromEnum, markType, markDep, enumGetBox, runOn } from "igniteui-react-core";
import { List$1 } from "igniteui-react-core";
import { UIElement } from "igniteui-react-core";
import { ActualRange } from "./ActualRange";
import { DependencyProperty } from "igniteui-react-core";
import { SizeScale } from "./SizeScale";
import { BrushScale } from "./BrushScale";
import { ScatterFrame } from "./ScatterFrame";
import { IChartLegend_$type } from "igniteui-react-core";
import { ValueBrushScale } from "./ValueBrushScale";
import { IFastItemsSource_$type } from "igniteui-react-core";
import { ScatterBaseView } from "./ScatterBaseView";
import { ScalerParams } from "./ScalerParams";
import { Dictionary$2 } from "igniteui-react-core";
import { OwnedPoint } from "./OwnedPoint";
import { BubbleMarkerManager } from "./BubbleMarkerManager";
import { IChartItemLegend_$type } from "igniteui-react-core";
import { IChartScaleLegend_$type } from "igniteui-react-core";
import { ContentControl } from "igniteui-react-core";
import { DataContext } from "igniteui-react-core";
import { DeviceUtils } from "igniteui-react-core";
import { BrushUtil } from "igniteui-react-core";
import { ChartSelection } from "./ChartSelection";
import { FastItemsSource } from "igniteui-react-core";
import { FastItemColumn } from "igniteui-react-core";
import { DataLegendSeriesValueInfo } from "igniteui-react-core";
import { DataLegendSeriesContext } from "igniteui-react-core";
import { PropertyMetadata } from "igniteui-react-core";
import { isNaN_, isInfinity, logBase } from "igniteui-react-core";
import { stringIsNullOrEmpty } from "igniteui-react-core";
import { BrushSelectionMode_$type } from "./BrushSelectionMode";
import { ScatterTrendLineManager } from "./ScatterTrendLineManager";
import { Defaults } from "./Defaults";
/**
* @hidden
*/
var BubbleSeries = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(BubbleSeries, _super);
function BubbleSeries() {
var _this = _super.call(this) || this;
_this.ae7 = null;
_this.ae6 = null;
_this.adu = null;
_this.adl = null;
_this.adk = null;
_this.adj = null;
_this.adh = null;
_this.ab = BubbleSeries.$;
_this.zs = new ScatterFrame();
_this.zu = new ScatterFrame();
_this.zq = new ScatterFrame();
return _this;
}
BubbleSeries.prototype.bk = function () {
return new BubbleSeries();
};
BubbleSeries.prototype.get_ek = function () {
return true;
};
BubbleSeries.prototype.ct = function () {
return new BubbleSeriesView(this);
};
BubbleSeries.prototype.rj = function (a) {
_super.prototype.rj.call(this, a);
this.adg = a;
};
BubbleSeries.prototype.jv = function () {
return 0.7;
};
BubbleSeries.prototype.xo = function () {
if (this.xn == 0) {
return 2;
}
return _super.prototype.xo.call(this);
};
BubbleSeries.prototype.isAttachedTo = function (a) {
return this.a5 == a;
};
BubbleSeries.prototype.ej = function () {
return true;
};
BubbleSeries.prototype.qi = function (a) {
_super.prototype.qi.call(this, a);
if (this.adp != null && this.adu != null && this.adu.count > 0) {
for (var b = 0; b < this.adu.count; b++) {
a(this.adu._inner[b]);
}
}
};
Object.defineProperty(BubbleSeries.prototype, "ado", {
get: function () {
return this.adq;
},
enumerable: false,
configurable: true
});
BubbleSeries.prototype.get_isColoredItemwise = function () {
return this.adm != null && this.adm.count > 0;
};
BubbleSeries.prototype.ae5 = function (a) {
var b = typeCast(CustomPaletteBrushScale.$, this.adf);
var c = typeCast(ValueBrushScale.$, this.adf);
var d = this.adf;
if (b != null && this.dp != null) {
return b.getBrush1(a, this.dp.count);
}
else if (c != null) {
return c.getBrushByIndex(a, this.adm);
}
else if (d != null) {
return d.getBrush(a);
}
return null;
};
Object.defineProperty(BubbleSeries.prototype, "legendReady", {
get: function () {
return this.adq != null && this.adq.count != 0;
},
enumerable: false,
configurable: true
});
Object.defineProperty(BubbleSeries.prototype, "minScaleText", {
get: function () {
var a = this.ade(this.adi).b;
return (Math.round(a * 1000) / 1000).toString();
},
enumerable: false,
configurable: true
});
Object.defineProperty(BubbleSeries.prototype, "maxScaleText", {
get: function () {
var a = this.ade(this.adi).a;
return (Math.round(a * 1000) / 1000).toString();
},
enumerable: false,
configurable: true
});
BubbleSeries.prototype.forScaleColors = function (a) {
for (var b = 0; b < this.adq.count; b++) {
if (this.adf == null || !this.adf.isReady) {
return false;
}
var c = NaN;
if (this.adm != null) {
c = (this.adm.item(b) - this.adm.minimum) / (this.adm.maximum - this.adm.minimum);
}
var d = (this.adq.item(b) - this.adq.minimum) / (this.adq.maximum - this.adq.minimum);
if (isNaN_(c)) {
c = 0;
}
if (isNaN_(d)) {
d = c;
}
var e = this.y7;
var f = this.ae5(b);
var g = f != null ? f : e;
a(g, d);
}
return true;
};
BubbleSeries.prototype.k1 = function (a, b) {
var c = this.nq(b);
if (c == BubbleSeries.$$p[5]) {
return this.k2(a, b, this.ad9);
}
if (c == BubbleSeries.$$p[11]) {
return this.k2(a, b, this.aej);
}
if (c == ScatterBase.$$p[12]) {
return this.k2(a, b, this.abj);
}
if (c == ScatterBase.$$p[16]) {
return this.k2(a, b, this.abr);
}
if (c == BubbleSeries.$$p[2]) {
return this.k2(a, b, this.ad4);
}
return _super.prototype.k1.call(this, a, b);
};
BubbleSeries.prototype.mq = function (a) {
var b = this.nq(a);
if (b == BubbleSeries.$$p[5]) {
return this.ad9;
}
if (b == BubbleSeries.$$p[11]) {
return this.aej;
}
if (b == ScatterBase.$$p[12]) {
return this.abj;
}
if (b == ScatterBase.$$p[16]) {
return this.abr;
}
if (b == BubbleSeries.$$p[2]) {
return this.ad4;
}
return _super.prototype.mq.call(this, a);
};
Object.defineProperty(BubbleSeries.prototype, "adq", {
get: function () {
return this.adl;
},
set: function (a) {
if (this.adl != a) {
var b = this.adq;
this.adl = a;
this.raisePropertyChanged("RadiusColumn", b, this.adq);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(BubbleSeries.prototype, "adp", {
get: function () {
return this.adk;
},
set: function (a) {
if (this.adk != a) {
var b = this.adp;
this.adk = a;
this.raisePropertyChanged("LabelColumn", b, this.adp);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(BubbleSeries.prototype, "adm", {
get: function () {
return this.adj;
},
set: function (a) {
if (this.adj != a) {
var b = this.adm;
this.adj = a;
this.raisePropertyChanged("FillColumn", b, this.adm);
}
},
enumerable: false,
configurable: true
});
BubbleSeries.prototype.abu = function (a, b, c, d, e) {
if (c <= this.aaz) {
b.j = new Dictionary$2(Base.$, OwnedPoint.$, 1, c);
}
var f = this.aaz;
var g = this.dp;
var h;
var i;
var j = this.getEffectiveViewport1(a);
var k = new ScalerParams(0, d, e, this.zm.d, j);
var l = new ScalerParams(0, d, e, this.zm.e, j);
var m = false;
var n = 0;
if (this.dc != null) {
if (this.dc.g1()) {
var o = this.dc.ol(d, k);
m = o.c;
n = o.d;
}
}
var _loop_1 = function (p) {
h = this_1.z7.item(p);
i = this_1.z8.item(p);
var q = { $type: Point_$type, x: this_1.zm.a.f7(h, k), y: this_1.zm.b.f7(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)) {
var r_1 = g.item(p);
if (c <= f) {
if (!b.j.containsKey(r_1)) {
var s_1 = { $type: Point_$type, x: h, y: i };
b.j.addItem(r_1, ((function () {
var $ret = new OwnedPoint();
$ret.a = r_1;
$ret.b = s_1;
$ret.c = q;
return $ret;
})()));
}
}
}
};
var this_1 = this;
for (var p = 0; p < c; p++) {
_loop_1(p);
}
};
BubbleSeries.prototype.ab5 = function (a, b) {
var c = typeCast(BubbleSeriesView.$, b);
var d = c.dd;
d.m = this.adq;
_super.prototype.ab5.call(this, a, b);
var e = Math.min(this.z7 != null ? this.z7.count : 0, this.z8 != null ? this.z8.count : 0);
if (e < 1) {
return;
}
c.d0();
c.d1();
};
BubbleSeries.prototype.aeo = function () {
if (this.dc == null) {
return;
}
if (this.a5 == null) {
return;
}
if (this.a5.isItemwise) {
var a = this.a5;
this.a5.clearLegendItemsForSeries(this);
this.aen();
a.renderItemwiseContent(this);
}
if (this.a5.isScale) {
var b = this.a5;
b.restoreOriginalState();
b.initializeLegend(this);
}
};
BubbleSeries.adv = function (a, b, c, d, e) {
if (e <= a || isNaN_(e) || isInfinity(e)) {
return c;
}
if (e >= b) {
return d;
}
var f = c + ((d - c) / (b - a)) * (e - a);
return f;
};
BubbleSeries.adw = function (a, b, c, d, logBase_, e) {
var f = logBase(e, logBase_);
var g = logBase(a, logBase_);
var h = logBase(b, logBase_);
return BubbleSeries.adv(g, h, c, d, f);
};
BubbleSeries.prototype.hm = function (a, b, c) {
var d = _super.prototype.hm.call(this, a, b, c);
if (this.adq == null || this.dp == null || this.adq.count == 0 || this.dp.count != this.adq.count) {
d = false;
}
return d;
};
BubbleSeries.prototype.aah = function (a, b) {
if (b != 3) {
return true;
}
if (a == null) {
return true;
}
if (this.abj == a || this.abr == a || this.aej == a) {
return true;
}
return false;
};
BubbleSeries.prototype.aen = function () {
var _this = this;
var a = typeCast(IChartLegend_$type, this.a5);
if (a == null || this.dp == null) {
return;
}
this.adu = new List$1(UIElement.$, 0);
var b = typeCast(CustomPaletteBrushScale.$, this.adf);
var c = typeCast(ValueBrushScale.$, this.adf);
var d = this.adf;
var e = this.add();
var f = e.b;
var g = e.a;
var h = this.dp;
var _loop_2 = function (i) {
var j = null;
if (c != null && this_2.adm != null) {
var k = this_2.adm.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);
}
var l = new ContentControl();
var m = this_2.adp != null && this_2.adp.item(i) != null ? this_2.adp.item(i).toString() : "";
l.content = ((function () {
var $ret = new DataContext();
$ret.series = _this;
$ret.item = h.item(i);
$ret.itemBrush = j;
$ret.itemLabel = m;
$ret.legendLabel = m;
return $ret;
})());
var n = this_2.th;
if (n == null) {
n = this_2.cw.bz(this_2.c1);
}
l.ah = n;
this_2.adu.add(l);
};
var this_2 = this;
for (var i = 0; i < h.count; i++) {
_loop_2(i);
}
};
BubbleSeries.prototype.pq = function (a, b, c, d) {
_super.prototype.pq.call(this, a, b, c, d);
if (this.adi != null) {
this.adi.aa();
}
if (this.adf != null) {
this.adf.x();
}
this.aeo();
};
BubbleSeries.prototype.qu = function () {
_super.prototype.qu.call(this);
this.aeo();
};
BubbleSeries.prototype.q1 = function () {
_super.prototype.q1.call(this);
this.aeo();
};
BubbleSeries.prototype.rs = function (a, b, c, d) {
var e_1, _a;
_super.prototype.rs.call(this, 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.qw();
break;
case "FastItemsSource":
if (this.adi != null) {
this.adi.aa();
}
if (this.adf != null) {
this.adf.x();
}
if (typeCast(IFastItemsSource_$type, c) != null) {
c.deregisterColumn(this.adq);
c.deregisterColumn(this.adm);
c.deregisterColumn(this.adp);
this.adq = null;
this.adm = null;
this.adp = null;
}
if (typeCast(IFastItemsSource_$type, d) != null) {
this.adq = this.dl(this.aej);
if (!stringIsNullOrEmpty(this.ad4)) {
this.adm = this.dl(this.ad4);
}
this.adp = this.dn(this.ad9);
}
this.sa(false);
this.aeo();
break;
case BubbleSeries.$$p[11]:
if (this.adi != null) {
this.adi.aa();
}
if (this.dp != null) {
this.dp.deregisterColumn(this.adq);
this.adq = this.dl(this.aej);
this.aeo();
}
break;
case "RadiusColumn":
if (this.adi != null) {
this.adi.aa();
}
this.zn.df.g$m();
this.sa(this.go && this.d9);
this.q3();
break;
case BubbleSeries.$$p[12]:
if (c != null) {
c.l.remove(this);
c.aa();
}
if (d != null) {
d.l.add(this);
d.aa();
}
this.sa(false);
this.q2();
break;
case BubbleSeries.$$p[13]:
this.sa(false);
this.q2();
break;
case "DiscreteLegendItemTemplate":
this.aeo();
break;
case BubbleSeries.$$p[3]:
if (c != null) {
c.o.remove(this);
c.x();
}
if (d != null) {
d.o.add(this);
d.x();
}
this.sa(false);
this.aeo();
this.q2();
break;
case BubbleSeries.$$p[4]:
case BubbleSeries.$$p[8]:
case BubbleSeries.$$p[7]:
case BubbleSeries.$$p[6]:
this.sa(false);
this.aeo();
this.q2();
break;
case "FillColumn":
this.sa(this.go && this.d9);
this.q2();
break;
case BubbleSeries.$$p[2]:
if (this.adf != null) {
this.adf.x();
}
if (this.dp != null) {
this.dp.deregisterColumn(this.adm);
this.adm = this.dl(this.ad4);
this.aeo();
}
break;
case BubbleSeries.$$p[5]:
if (this.dp != null) {
this.dp.deregisterColumn(this.adp);
this.adp = this.dn(this.ad9);
this.aeo();
}
break;
case "ActualLegend":
var e = typeCast(IChartLegend_$type, c);
if (e != null && e.isItemwise) {
var f = typeCast(IChartItemLegend_$type, e);
f.clearLegendItemsForSeries(this);
}
if (e != null && e.isScale) {
var g = typeCast(IChartScaleLegend_$type, e);
var h = true;
var i = null;
if (this.dc != null) {
try {
for (var _b = __values(fromEnum(this.dc.b9)), _c = _b.next(); !_c.done; _c = _b.next()) {
var j = _c.value;
if (j.legend == g) {
i = j;
h = false;
}
}
}
catch (e_1_1) {
e_1 = { error: e_1_1 };
}
finally {
try {
if (_c && !_c.done && (_a = _b.return))
_a.call(_b);
}
finally {
if (e_1)
throw e_1.error;
}
}
}
if (h) {
g.restoreOriginalState();
}
else {
g.initializeLegend(typeCast(IScaleLegendSeries_$type, i));
}
}
this.aeo();
break;
case "SeriesViewer":
this.aeo();
break;
}
};
BubbleSeries.prototype.updateSizeScaleGlobals = function () {
var a = new ActualRange();
a.b = NaN;
a.a = NaN;
if (this.adq != null) {
a.b = this.adq.minimum;
a.a = this.adq.maximum;
}
if (this.adi != null) {
this.adi.ab(a.b, a.a);
}
};
BubbleSeries.prototype.updateFillScaleGlobals = function () {
var a = new ActualRange();
a.b = NaN;
a.a = NaN;
if (this.adm != null) {
a.b = this.adm.minimum;
a.a = this.adm.maximum;
}
if (this.adf != null) {
this.adf.z(a.b, a.a);
}
};
BubbleSeries.prototype.ade = function (a) {
var b = new ActualRange();
b.b = NaN;
b.a = NaN;
if (this.adq != null) {
b.b = this.adq.minimum;
b.a = this.adq.maximum;
}
if (a != null) {
a.x();
if (this.adt) {
b.b = a.globalMinimum;
b.a = a.globalMaximum;
}
}
return b;
};
BubbleSeries.prototype.add = function () {
var a = new ActualRange();
a.b = NaN;
a.a = NaN;
if (this.adm != null) {
a.b = this.adm.minimum;
a.a = this.adm.maximum;
}
var b = typeCast(ValueBrushScale.$, this.adf);
if (b != null) {
b.s();
if (this.adr && this.adf.o.count > 1) {
a.b = b.q;
a.a = b.p;
}
}
return a;
};
BubbleSeries.prototype.aeq = function (a, b, c, d) {
var e = c.width;
if (!this.cw.b9.isEmpty) {
e = this.cw.b9.width;
}
else if (this.dc != null && !this.dc.zd.isEmpty) {
e = this.dc.zd.width;
}
var f = DeviceUtils.c(e);
this.adh = this.adi || ((function () {
var $ret = new SizeScale();
$ret.minimumValue = f / 10;
$ret.maximumValue = f / 5;
return $ret;
})());
if (this.adh != null) {
var g = this.adh.minimumValue;
var h = this.adh.maximumValue;
var i = this.adh.logarithmBase;
var j = this.ade(this.adh);
var k = j.b;
var l = j.a;
if (this.adh.isLogarithmic) {
for (var m = 0; m < b.count; m++) {
b._inner[m] = BubbleSeries.adw(k, l, g, h, i, b._inner[m]);
}
}
else {
for (var n = 0; n < b.count; n++) {
b._inner[n] = BubbleSeries.adv(k, l, g, h, b._inner[n]);
}
}
}
var o = 1;
o = DeviceUtils.d();
var p = this.adi == null;
if (d) {
var q = c.width / e;
for (var r = 0; r < b.count; r++) {
if (p) {
b._inner[r] = b._inner[r] / o;
}
b._inner[r] = b._inner[r] * q;
}
}
for (var s = 0; s < a.count; s++) {
var 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);
t.ai = false;
}
else {
t.width = Math.max(0, b._inner[s]);
t.height = Math.max(0, b._inner[s]);
t.ai = false;
}
}
};
BubbleSeries.prototype.aep = function (a) {
var b = typeCast(BubbleSeriesView.$, this.cv);
this.adg.ck = false;
if (b != null) {
b.ck = false;
}
var c = typeCast(CustomPaletteBrushScale.$, this.adf);
var d = typeCast(ValueBrushScale.$, this.adf);
var e = this.adf;
var f = this.add();
var g = f.b;
var h = f.a;
var i = this.adf == null || !this.adf.isReady || (d != null && this.ad4 == null);
if (i) {
this.adg.dz();
if (b != null) {
b.dz();
}
return;
}
this.adg.ck = true;
if (b != null) {
b.ck = true;
}
var j = a.count;
var k = this.dp;
for (var l = 0; l < j; l++) {
var m = a._inner[l];
var n = typeCast(DataContext.$, m.content);
if (n != null) {
var o = null;
var p = k.indexOf(n.item);
if (c != null) {
o = c.getBrush1(p, k.count);
}
else if (d != null && this.adm != null) {
var q = this.adm.item(p);
o = d.getBrushByRange(q, g, h);
}
else if (e != null) {
o = e.getBrush(p);
}
else {
if (this.y9 == null) {
o = this.y7;
}
else {
o = this.y9;
}
}
var r = null;
if (this.za == null) {
r = this.y8;
}
else {
r = this.za;
}
if (this.ads && o != null) {
r = o;
}
if (r != null && !isNaN_(this.ady)) {
r = BrushUtil.q(r, this.ady);
}
if (o != null && !isNaN_(this.adx)) {
o = BrushUtil.q(o, this.adx);
}
n.itemBrush = o;
n.actualItemBrush = o;
n.outline = r;
}
}
};
BubbleSeries.prototype.ak = function (a, b) {
var c = new List$1(ChartSelection.$, 0);
this.qk(a, c, b);
return c.toArray();
};
BubbleSeries.prototype.qk = function (a, b, c) {
var d = 1;
if (d == 1) {
var e = this.adn();
this.abx(a, b, c, d, e);
}
else {
_super.prototype.qk.call(this, a, b, c);
}
};
BubbleSeries.prototype.adn = function () {
var a = new FastItemColumn(typeCast(FastItemsSource.$, this.dp), "RadiusColumn", null, false);
var b = this.cw.b9;
var c = b.width;
if (!this.cw.b9.isEmpty) {
c = this.cw.b9.width;
}
else if (this.dc != null && !this.dc.zd.isEmpty) {
c = this.dc.zd.width;
}
var d = DeviceUtils.c(c);
this.adh = this.adi || ((function () {
var $ret = new SizeScale();
$ret.minimumValue = d / 10;
$ret.maximumValue = d / 5;
return $ret;
})());
if (this.adh != null) {
var e = this.adh.minimumValue;
var f = this.adh.maximumValue;
var g = this.adh.logarithmBase;
var h = this.ade(this.adh);
var i = h.b;
var j = h.a;
if (this.adh.isLogarithmic) {
for (var k = 0; k < a.count; k++) {
a.item(k, BubbleSeries.adw(i, j, e, f, g, a.item(k)));
}
}
else {
for (var l = 0; l < a.count; l++) {
a.item(l, BubbleSeries.adv(i, j, e, f, a.item(l)));
}
}
}
var m = DeviceUtils.d();
var n = this.adi == null;
var o = this.cw == this.cv;
if (o) {
var p = b.width / c;
for (var q = 0; q < a.count; q++) {
if (n) {
a.item(q, a.item(q) / m);
}
a.item(q, a.item(q) * p);
}
}
for (var r = 0; r < a.count; r++) {
var s = void 0;
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;
};
BubbleSeries.prototype.getDataLegendSeriesContextAt = function (a, b) {
var c = { $type: Point_$type, x: a, y: b };
var d = this.ky(c);
var e = d == null ? NaN : this.i6(d, "XMemberPath");
var f = d == null ? NaN : this.i6(d, "YMemberPath");
var g = new DataLegendSeriesValueInfo();
g.a = 13;
g.l = e;
g.q = "X";
g.r = this.abj != null ? this.abj : "X";
g.s = this.abf != null ? this.abf : "X:";
g.t = this.abh != null ? this.abh : "";
var h = new DataLegendSeriesValueInfo();
h.l = f;
h.a = 14;
h.q = "Y";
h.r = this.abr != null ? this.abr : "Y";
h.s = this.abn != null ? this.abn : "Y:";
h.t = this.abp != null ? this.abp : "";
var i = new DataLegendSeriesContext();
i.e = ((function () {
var $ret = new List$1(DataLegendSeriesValueInfo.$, 0);
$ret.add(g);
$ret.add(h);
return $ret;
})());
i.h = this.mp();
if (!stringIsNullOrEmpty(this.aej)) {
var j = d == null ? NaN : this.i6(d, "RadiusMemberPath");
var k = new DataLegendSeriesValueInfo();
k.l = j;
k.a = 11;
k.q = "Radius";
k.r = this.aej != null ? this.aej : "Radius";
k.s = this.aef != null ? this.aef : "R:";
k.t = this.aeh != null ? this.aeh : "";
i.e.add(k);
}
else if (this.adh != null) {
var l = new DataLegendSeriesValueInfo();
l.l = this.adh.maximumValue;
l.a = 11;
l.q = "Radius";
l.r = this.aej != null ? this.aej : "Radius";
l.s = this.aef != null ? this.aef : "R:";
l.t = this.aeh != null ? this.aeh : "";
i.e.add(l);
}
if (!stringIsNullOrEmpty(this.ad4)) {
var m = d == null ? NaN : this.i6(d, "FillMemberPath");
var n = new DataLegendSeriesValueInfo();
n.l = m;
n.a = 12;
n.q = "Fill";
n.r = this.ad4 != null ? this.ad4 : "Fill";
n.s = this.ad0 != null ? this.ad0 : "F:";
n.t = this.ad2 != null ? this.ad2 : "";
i.e.add(n);
}
return i;
};
Object.defineProperty(BubbleSeries.prototype, "actualMarkerBrush", {
get: function () {
return this.y7;
},
enumerable: false,
configurable: true
});
BubbleSeries.$t = markType(BubbleSeries, 'BubbleSeries', ScatterBase.$, [IScaleLegendSeries_$type, ISupportsSizeScale_$type, ISupportsFillScale_$type]);
BubbleSeries.$$p = markDep(DependencyProperty, PropertyMetadata, BubbleSeries, 'raisePropertyChanged', ['FillMemberAsLegendLabel:ad0:aer', [2, null], 'FillMemberAsLegendUnit:ad2:aes', [2, null], 'FillMemberPath:ad4:aet', [2], 'FillScale:adf:aeu', [BrushScale.$], 'FillScaleUseGlobalValues:adr:aev', [0, false], 'LabelMemberPath:ad9:aew', [2], 'MarkerBrushBrightness:adx:aex', [1, NaN], 'MarkerOutlineBrightness:ady:aey', [1, NaN], 'MarkerOutlineUsesFillScale:ads:aez', [0, false], 'RadiusMemberAsLegendLabel:aef:ae0', [2, null], 'RadiusMemberAsLegendUnit:aeh:ae1', [2, null], 'RadiusMemberPath:aej:ae2', [2, null], 'RadiusScale:adi:ae3', [SizeScale.$], 'RadiusScaleUseGlobalValues:adt:ae4', [0, false]]);
return BubbleSeries;
}(ScatterBase));
export { BubbleSeries };
/**
* @hidden
*/
var CustomPaletteBrushScale = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(CustomPaletteBrushScale, _super);
function CustomPaletteBrushScale() {
return _super.call(this) || this;
}
CustomPaletteBrushScale.prototype.getBrush1 = function (a, b) {
if (this.brushes == null || this.brushes.count == 0) {
return null;
}
if (this.brushSelectionMode == 0) {
return _super.prototype.getBrush.call(this, a % this.brushes.count);
}
var c = BubbleSeries.adv(0, b - 1, 0, this.brushes.count - 1, a);
return this.ab(c);
};
CustomPaletteBrushScale.prototype.get_isReady = function () {
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;
}(BrushScale));
export { CustomPaletteBrushScale };
/**
* @hidden
*/
var BubbleSeriesView = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(BubbleSeriesView, _super);
function BubbleSeriesView(a) {
var _this = _super.call(this, a) || this;
_this.dy = null;
_this.dy = a;
_this.df = new ScatterTrendLineManager();
return _this;
}
BubbleSeriesView.prototype.a4 = function () {
_super.prototype.a4.call(this);
if (!this.t) {
this.ch.xx = Defaults.e;
}
};
BubbleSeriesView.prototype.dc = function () {
var _this = this;
return new BubbleMarkerManager(function (a) { return _this.dg.item(a); }, function (a) { return _this.de.zm.c.item(a); }, runOn(this, this.ds), runOn(this, this.c9), runOn(this, this.dh));
};
BubbleSeriesView.prototype.d0 = function () {
var a = this.dd;
this.dy.aeq(a.n, a.o, this.b9, this == this.f.cv);
this.a2();
};
BubbleSeriesView.prototype.d1 = function () {
var a = this.dd;
this.dy.aep(a.n);
};
BubbleSeriesView.prototype.dz = function () {
var e_2, _a;
var a = this.dd;
try {
for (var _b = __values(fromEnum(a.n)), _c = _b.next(); !_c.done; _c = _b.next()) {
var b = _c.value;
var c = typeCast(DataContext.$, b.content);
if (c != null) {
c.itemBrush = null;
c.outline = null;
}
}
}
catch (e_2_1) {
e_2 = { error: e_2_1 };
}
finally {
try {
if (_c && !_c.done && (_a = _b.return))
_a.call(_b);
}
finally {
if (e_2)
throw e_2.error;
}
}
};
BubbleSeriesView.prototype.getDefaultTooltipTemplate = function () {
var a = "<div class='ui-chart-default-tooltip-content'><span";
var 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.abj + "}, ${item." + this.dy.abr + "})</span>";
if (!stringIsNullOrEmpty(this.dy.aej)) {
a += "<span>, Radius: ${item." + this.dy.aej + "}</span>";
}
a += "</div>";
return a;
};
BubbleSeriesView.$t = markType(BubbleSeriesView, 'BubbleSeriesView', ScatterBaseView.$);
return BubbleSeriesView;
}(ScatterBaseView));
export { BubbleSeriesView };