igniteui-angular-charts
Version:
Ignite UI Angular charting components for building rich data visualizations for modern web apps.
344 lines (343 loc) • 11.7 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-angular-core";
import { List$1 } from "igniteui-angular-core";
import { DataSeriesType_$type } from "igniteui-angular-core";
import { IDataSeriesAdapterRule_$type } from "igniteui-angular-core";
import { SimplePieSeriesRule } from "igniteui-angular-core";
import { SubCollectionsRule } from "igniteui-angular-core";
import { DataPieChartType_$type } from "./DataPieChartType";
import { CategoryTransitionInMode_$type } from "./CategoryTransitionInMode";
import { TransitionInSpeedType_$type } from "./TransitionInSpeedType";
import { BrushUtil } from "igniteui-angular-core";
import { AxisDefaults } from "./AxisDefaults";
import { Defaults } from "./Defaults";
import { DeviceUtils } from "igniteui-angular-core";
import { RadialBase } from "./RadialBase";
import { RadialPieSeries } from "./RadialPieSeries";
/**
* @hidden
*/
var DataPieChart = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(DataPieChart, _super);
function DataPieChart() {
var _this = _super.call(this) || this;
_this.alz = 1000;
_this.al0 = 1000;
_this.alt = null;
_this.alu = null;
_this.alp = 0;
_this.alx = true;
_this.aln = 0;
_this.alr = 3;
_this.u2();
return _this;
}
DataPieChart.prototype.vm = function () {
_super.prototype.vm.call(this);
if (this.dataChart == null) {
return;
}
var a = this.dataChart.c9.j.e();
if (this.ag9 == null) {
this.ag9 = a.k;
}
if (this.ahg == null) {
this.ahg = a.k;
}
this.ac4 = 0;
this.ahh = BrushUtil.j(0, 0, 0, 0);
this.ahk = BrushUtil.j(0, 0, 0, 0);
this.ahd = BrushUtil.j(0, 0, 0, 0);
this.aha = BrushUtil.j(0, 0, 0, 0);
this.ach = 0;
this.ahe = BrushUtil.j(0, 0, 0, 0);
this.aci = AxisDefaults.axis_TickStroke;
this.ahv = 1;
this.ahw = 1;
this.crosshairsDisplayMode = 1;
this.gq = true;
this.jq = Defaults.crosshairLineThickness;
this.yy = Defaults.crosshairLineBrush;
this.yt = Defaults.crosshairXAxisAnnotationBackground;
this.yu = Defaults.crosshairXAxisAnnotationTextColor;
this.autoCalloutsVisible = true;
this.ho = true;
this.g6 = false;
this.he = false;
this.bz = 1;
this.bv = 11;
this.aly = true;
this.yn = BrushUtil.j(255, 255, 255, 255);
this.jp = DeviceUtils.g(2);
this.go = true;
this.gm = true;
this.gj = true;
this.dl = 4;
this.dj = 4;
};
DataPieChart.prototype.vo = function (a, b) {
_super.prototype.vo.call(this, a, b);
a.kf = this.al1;
a.kg = this.al2;
a.df = this.alv;
a.dg = this.alw;
};
DataPieChart.prototype.wh = function (a, b, c) {
var _this = this;
_super.prototype.wh.call(this, a, b, c);
switch (a) {
case "TransitionInDuration":
this.vb(function (d) { return d.kf = _this.al1; });
break;
case "TransitionOutDuration":
this.vb(function (d) { return d.kg = _this.al2; });
break;
case "TransitionInEasingFunction":
this.vb(function (d) { return d.df = _this.alv; });
break;
case "TransitionOutEasingFunction":
this.vb(function (d) { return d.dg = _this.alw; });
break;
}
};
Object.defineProperty(DataPieChart.prototype, "al1", {
get: function () {
return this.alz;
},
set: function (a) {
var b = this.al1;
if (a != b) {
this.alz = a;
this.wd("TransitionInDuration", b, this.al1);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(DataPieChart.prototype, "al2", {
get: function () {
return this.al0;
},
set: function (a) {
var b = this.al2;
if (a != b) {
this.al0 = a;
this.wd("TransitionOutDuration", b, this.al2);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(DataPieChart.prototype, "alv", {
get: function () {
return this.alt;
},
set: function (a) {
var b = this.alv;
if (a != b) {
this.alt = a;
this.wd("TransitionInEasingFunction", b, this.alv);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(DataPieChart.prototype, "alw", {
get: function () {
return this.alu;
},
set: function (a) {
var b = this.alw;
if (a != b) {
this.alu = a;
this.wd("TransitionOutEasingFunction", b, this.alw);
}
},
enumerable: false,
configurable: true
});
DataPieChart.prototype.al4 = function () {
var cvd_ = this.l5();
cvd_.scaleByViewport();
return (cvd_.serialize());
};
DataPieChart.prototype.get_h2 = function () {
return ((function () {
var $ret = new List$1(DataSeriesType_$type, 0);
$ret.add(35);
return $ret;
})());
};
Object.defineProperty(DataPieChart.prototype, "h2", {
get: function () {
return this.get_h2();
},
enumerable: false,
configurable: true
});
DataPieChart.prototype.get_h1 = 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, "h1", {
get: function () {
return this.get_h1();
},
enumerable: false,
configurable: true
});
DataPieChart.prototype.get_aiy = function () {
return false;
};
DataPieChart.prototype.be = function (a) {
if (this.alq == 0) {
return a.suggestedSeries;
}
if (this.alq == 1) {
return 35;
}
return 35;
};
DataPieChart.prototype.dc = function (a, b) {
var c = _super.prototype.dc.call(this, a, b);
return c;
};
DataPieChart.prototype.vh = function (a, b) {
_super.prototype.vh.call(this, a, b);
};
DataPieChart.prototype.vn = function (a, b) {
_super.prototype.vn.call(this, a, b);
var c = typeCast(RadialBase.$, a);
if (c == null) {
return;
}
c.zw = this.aly;
c.y8 = this.alo;
c.c6 = this.als;
};
DataPieChart.prototype.ur = function (a, b) {
_super.prototype.ur.call(this, a, b);
var c = typeCast(RadialPieSeries.$, a);
if (c != null) {
c.xf = this.c2(a, b);
}
};
DataPieChart.prototype.c1 = function (a) {
return 13;
};
DataPieChart.prototype.wd = function (a, b, c) {
_super.prototype.wd.call(this, a, b, c);
switch (a) {
case "ChartType":
this.u8();
break;
case "IsTransitionInEnabled":
this.u6(function (d) {
var e = typeCast(RadialBase.$, d);
if (e == null) {
return;
}
e.zw = c;
});
break;
case "TransitionInMode":
this.u6(function (d) {
var e = typeCast(RadialBase.$, d);
if (e == null) {
return;
}
e.y8 = EnumUtil.getEnumValue(CategoryTransitionInMode_$type, c);
});
break;
case "TransitionInSpeedType":
this.u6(function (d) {
var e = typeCast(RadialBase.$, d);
if (e == null) {
return;
}
e.c6 = EnumUtil.getEnumValue(TransitionInSpeedType_$type, c);
});
break;
}
};
DataPieChart.prototype.get_cb = function () {
return 4;
};
Object.defineProperty(DataPieChart.prototype, "cb", {
get: function () {
return this.get_cb();
},
enumerable: false,
configurable: true
});
Object.defineProperty(DataPieChart.prototype, "alq", {
get: function () {
return this.alp;
},
set: function (a) {
if (a != this.alp) {
var b = this.alq;
this.alp = a;
this.wd("ChartType", enumGetBox(DataPieChartType_$type, b), enumGetBox(DataPieChartType_$type, this.alq));
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(DataPieChart.prototype, "aly", {
get: function () {
return this.alx;
},
set: function (a) {
var b = this.aly;
if (a != b) {
this.alx = a;
this.wd("IsTransitionInEnabled", b, this.aly);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(DataPieChart.prototype, "alo", {
get: function () {
return this.aln;
},
set: function (a) {
var b = this.alo;
if (a != b) {
this.aln = a;
this.wd("TransitionInMode", enumGetBox(CategoryTransitionInMode_$type, b), enumGetBox(CategoryTransitionInMode_$type, this.alo));
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(DataPieChart.prototype, "als", {
get: function () {
return this.alr;
},
set: function (a) {
var b = this.als;
if (a != b) {
this.alr = a;
this.wd("TransitionInSpeedType", enumGetBox(TransitionInSpeedType_$type, b), enumGetBox(TransitionInSpeedType_$type, this.als));
}
},
enumerable: false,
configurable: true
});
DataPieChart.$t = markType(DataPieChart, 'DataPieChart', DataPieBaseChart.$);
return DataPieChart;
}(DataPieBaseChart));
export { DataPieChart };