igniteui-webcomponents-charts
Version:
Ignite UI Web Components charting components for building rich data visualizations using TypeScript APIs.
343 lines (342 loc) • 11.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 { __extends } from "tslib";
import { DataPieBaseChart } from "./DataPieBaseChart";
import { typeCast, EnumUtil, enumGetBox, markType } from "igniteui-webcomponents-core";
import { List$1 } from "igniteui-webcomponents-core";
import { DataSeriesType_$type } from "igniteui-webcomponents-core";
import { IDataSeriesAdapterRule_$type } from "igniteui-webcomponents-core";
import { SimplePieSeriesRule } from "igniteui-webcomponents-core";
import { SubCollectionsRule } from "igniteui-webcomponents-core";
import { DataPieChartType_$type } from "./DataPieChartType";
import { CategoryTransitionInMode_$type } from "./CategoryTransitionInMode";
import { TransitionInSpeedType_$type } from "./TransitionInSpeedType";
import { BrushUtil } from "igniteui-webcomponents-core";
import { AxisDefaults } from "./AxisDefaults";
import { Defaults } from "./Defaults";
import { DeviceUtils } from "igniteui-webcomponents-core";
import { RadialBase } from "./RadialBase";
import { RadialPieSeries } from "./RadialPieSeries";
/**
* @hidden
*/
export var DataPieChart = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(DataPieChart, _super);
function DataPieChart() {
var _this = _super.call(this) || this;
_this.am6 = 1000;
_this.am7 = 1000;
_this.am0 = null;
_this.am1 = null;
_this.amw = 0;
_this.am4 = true;
_this.amu = 0;
_this.amy = 3;
_this.vn();
return _this;
}
DataPieChart.prototype.v9 = function () {
_super.prototype.v9.call(this);
if (this.dataChart == null) {
return;
}
var a = this.dataChart.dw.j.e();
if (this.ah4 == null) {
this.ah4 = a.k;
}
if (this.aib == null) {
this.aib = a.k;
}
this.adz = 0;
this.aic = BrushUtil.j(0, 0, 0, 0);
this.aif = BrushUtil.j(0, 0, 0, 0);
this.ah8 = BrushUtil.j(0, 0, 0, 0);
this.ah5 = BrushUtil.j(0, 0, 0, 0);
this.adc = 0;
this.ah9 = BrushUtil.j(0, 0, 0, 0);
this.add = AxisDefaults.axis_TickStroke;
this.aiq = 1;
this.air = 1;
this.crosshairsDisplayMode = 1;
this.g0 = true;
this.j3 = Defaults.crosshairLineThickness;
this.zt = Defaults.crosshairLineBrush;
this.zo = Defaults.crosshairXAxisAnnotationBackground;
this.zp = Defaults.crosshairXAxisAnnotationTextColor;
this.autoCalloutsVisible = true;
this.h0 = true;
this.hg = false;
this.hp = false;
this.b0 = 1;
this.bw = 11;
this.am5 = true;
this.zi = BrushUtil.j(255, 255, 255, 255);
this.j2 = DeviceUtils.g(2);
this.gw = true;
this.gu = true;
this.gr = true;
this.dn = 4;
this.dl = 4;
};
DataPieChart.prototype.wb = function (a, b) {
_super.prototype.wb.call(this, a, b);
a.kn = this.am8;
a.ko = this.am9;
a.df = this.am2;
a.dg = this.am3;
};
DataPieChart.prototype.w5 = function (a, b, c) {
var _this = this;
_super.prototype.w5.call(this, a, b, c);
switch (a) {
case "TransitionInDuration":
this.vy(function (d) { return d.kn = _this.am8; });
break;
case "TransitionOutDuration":
this.vy(function (d) { return d.ko = _this.am9; });
break;
case "TransitionInEasingFunction":
this.vy(function (d) { return d.df = _this.am2; });
break;
case "TransitionOutEasingFunction":
this.vy(function (d) { return d.dg = _this.am3; });
break;
}
};
Object.defineProperty(DataPieChart.prototype, "am8", {
get: function () {
return this.am6;
},
set: function (a) {
var b = this.am8;
if (a != b) {
this.am6 = a;
this.w1("TransitionInDuration", b, this.am8);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(DataPieChart.prototype, "am9", {
get: function () {
return this.am7;
},
set: function (a) {
var b = this.am9;
if (a != b) {
this.am7 = a;
this.w1("TransitionOutDuration", b, this.am9);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(DataPieChart.prototype, "am2", {
get: function () {
return this.am0;
},
set: function (a) {
var b = this.am2;
if (a != b) {
this.am0 = a;
this.w1("TransitionInEasingFunction", b, this.am2);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(DataPieChart.prototype, "am3", {
get: function () {
return this.am1;
},
set: function (a) {
var b = this.am3;
if (a != b) {
this.am1 = a;
this.w1("TransitionOutEasingFunction", b, this.am3);
}
},
enumerable: false,
configurable: true
});
DataPieChart.prototype.anb = function () {
var cvd_ = this.mj();
cvd_.scaleByViewport();
return (cvd_.serialize());
};
DataPieChart.prototype.get_ie = function () {
return ((function () {
var $ret = new List$1(DataSeriesType_$type, 0);
$ret.add(35);
return $ret;
})());
};
Object.defineProperty(DataPieChart.prototype, "ie", {
get: function () {
return this.get_ie();
},
enumerable: false,
configurable: true
});
DataPieChart.prototype.get_id = function () {
return ((function () {
var $ret = new List$1(IDataSeriesAdapterRule_$type, 0);
$ret.add(new SimplePieSeriesRule());
$ret.add(new SubCollectionsRule());
return $ret;
})());
};
Object.defineProperty(DataPieChart.prototype, "id", {
get: function () {
return this.get_id();
},
enumerable: false,
configurable: true
});
DataPieChart.prototype.get_aju = function () {
return false;
};
DataPieChart.prototype.bf = function (a) {
if (this.amx == 0) {
return a.suggestedSeries;
}
if (this.amx == 1) {
return 35;
}
return 35;
};
DataPieChart.prototype.de = function (a, b) {
var c = _super.prototype.de.call(this, a, b);
return c;
};
DataPieChart.prototype.v4 = function (a, b) {
_super.prototype.v4.call(this, a, b);
};
DataPieChart.prototype.wa = function (a, b) {
_super.prototype.wa.call(this, a, b);
var c = typeCast(RadialBase.$, a);
if (c == null) {
return;
}
c.aac = this.am5;
c.zo = this.amv;
c.c6 = this.amz;
};
DataPieChart.prototype.vb = function (a, b) {
_super.prototype.vb.call(this, a, b);
var c = typeCast(RadialPieSeries.$, a);
if (c != null) {
c.xv = this.c4(a, b);
}
};
DataPieChart.prototype.c3 = function (a) {
return 13;
};
DataPieChart.prototype.w1 = function (a, b, c) {
_super.prototype.w1.call(this, a, b, c);
switch (a) {
case "ChartType":
this.vv();
break;
case "IsTransitionInEnabled":
this.vt(function (d) {
var e = typeCast(RadialBase.$, d);
if (e == null) {
return;
}
e.aac = c;
});
break;
case "TransitionInMode":
this.vt(function (d) {
var e = typeCast(RadialBase.$, d);
if (e == null) {
return;
}
e.zo = EnumUtil.getEnumValue(CategoryTransitionInMode_$type, c);
});
break;
case "TransitionInSpeedType":
this.vt(function (d) {
var e = typeCast(RadialBase.$, d);
if (e == null) {
return;
}
e.c6 = EnumUtil.getEnumValue(TransitionInSpeedType_$type, c);
});
break;
}
};
DataPieChart.prototype.get_cd = function () {
return 4;
};
Object.defineProperty(DataPieChart.prototype, "cd", {
get: function () {
return this.get_cd();
},
enumerable: false,
configurable: true
});
Object.defineProperty(DataPieChart.prototype, "amx", {
get: function () {
return this.amw;
},
set: function (a) {
if (a != this.amw) {
var b = this.amx;
this.amw = a;
this.w1("ChartType", enumGetBox(DataPieChartType_$type, b), enumGetBox(DataPieChartType_$type, this.amx));
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(DataPieChart.prototype, "am5", {
get: function () {
return this.am4;
},
set: function (a) {
var b = this.am5;
if (a != b) {
this.am4 = a;
this.w1("IsTransitionInEnabled", b, this.am5);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(DataPieChart.prototype, "amv", {
get: function () {
return this.amu;
},
set: function (a) {
var b = this.amv;
if (a != b) {
this.amu = a;
this.w1("TransitionInMode", enumGetBox(CategoryTransitionInMode_$type, b), enumGetBox(CategoryTransitionInMode_$type, this.amv));
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(DataPieChart.prototype, "amz", {
get: function () {
return this.amy;
},
set: function (a) {
var b = this.amz;
if (a != b) {
this.amy = a;
this.w1("TransitionInSpeedType", enumGetBox(TransitionInSpeedType_$type, b), enumGetBox(TransitionInSpeedType_$type, this.amz));
}
},
enumerable: false,
configurable: true
});
DataPieChart.$t = markType(DataPieChart, 'DataPieChart', DataPieBaseChart.$);
return DataPieChart;
}(DataPieBaseChart));