igniteui-angular-charts
Version:
Ignite UI Angular charting components for building rich data visualizations for modern web apps.
297 lines (296 loc) • 9.86 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 { 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
*/
export let DataPieChart = /*@__PURE__*/ (() => {
class DataPieChart extends DataPieBaseChart {
constructor() {
super();
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();
}
vm() {
super.vm();
if (this.dataChart == null) {
return;
}
let 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;
}
vo(a, b) {
super.vo(a, b);
a.kf = this.al1;
a.kg = this.al2;
a.df = this.alv;
a.dg = this.alw;
}
wh(a, b, c) {
super.wh(a, b, c);
switch (a) {
case "TransitionInDuration":
this.vb((d) => d.kf = this.al1);
break;
case "TransitionOutDuration":
this.vb((d) => d.kg = this.al2);
break;
case "TransitionInEasingFunction":
this.vb((d) => d.df = this.alv);
break;
case "TransitionOutEasingFunction":
this.vb((d) => d.dg = this.alw);
break;
}
}
get al1() {
return this.alz;
}
set al1(a) {
let b = this.al1;
if (a != b) {
this.alz = a;
this.wd("TransitionInDuration", b, this.al1);
}
}
get al2() {
return this.al0;
}
set al2(a) {
let b = this.al2;
if (a != b) {
this.al0 = a;
this.wd("TransitionOutDuration", b, this.al2);
}
}
get alv() {
return this.alt;
}
set alv(a) {
let b = this.alv;
if (a != b) {
this.alt = a;
this.wd("TransitionInEasingFunction", b, this.alv);
}
}
get alw() {
return this.alu;
}
set alw(a) {
let b = this.alw;
if (a != b) {
this.alu = a;
this.wd("TransitionOutEasingFunction", b, this.alw);
}
}
al4() {
let cvd_ = this.l5();
cvd_.scaleByViewport();
return (cvd_.serialize());
}
get_h2() {
return ((() => {
let $ret = new List$1(DataSeriesType_$type, 0);
$ret.add(35);
return $ret;
})());
}
get h2() {
return this.get_h2();
}
get_h1() {
return ((() => {
let $ret = new List$1(IDataSeriesAdapterRule_$type, 0);
$ret.add(new SimplePieSeriesRule());
$ret.add(new SubCollectionsRule());
return $ret;
})());
}
get h1() {
return this.get_h1();
}
get_aiy() {
return false;
}
be(a) {
if (this.alq == 0) {
return a.suggestedSeries;
}
if (this.alq == 1) {
return 35;
}
return 35;
}
dc(a, b) {
let c = super.dc(a, b);
return c;
}
vh(a, b) {
super.vh(a, b);
}
vn(a, b) {
super.vn(a, b);
let c = typeCast(RadialBase.$, a);
if (c == null) {
return;
}
c.zw = this.aly;
c.y8 = this.alo;
c.c6 = this.als;
}
ur(a, b) {
super.ur(a, b);
let c = typeCast(RadialPieSeries.$, a);
if (c != null) {
c.xf = this.c2(a, b);
}
}
c1(a) {
return 13;
}
wd(a, b, c) {
super.wd(a, b, c);
switch (a) {
case "ChartType":
this.u8();
break;
case "IsTransitionInEnabled":
this.u6((d) => {
let e = typeCast(RadialBase.$, d);
if (e == null) {
return;
}
e.zw = c;
});
break;
case "TransitionInMode":
this.u6((d) => {
let e = typeCast(RadialBase.$, d);
if (e == null) {
return;
}
e.y8 = EnumUtil.getEnumValue(CategoryTransitionInMode_$type, c);
});
break;
case "TransitionInSpeedType":
this.u6((d) => {
let e = typeCast(RadialBase.$, d);
if (e == null) {
return;
}
e.c6 = EnumUtil.getEnumValue(TransitionInSpeedType_$type, c);
});
break;
}
}
get_cb() {
return 4;
}
get cb() {
return this.get_cb();
}
get alq() {
return this.alp;
}
set alq(a) {
if (a != this.alp) {
let b = this.alq;
this.alp = a;
this.wd("ChartType", enumGetBox(DataPieChartType_$type, b), enumGetBox(DataPieChartType_$type, this.alq));
}
}
get aly() {
return this.alx;
}
set aly(a) {
let b = this.aly;
if (a != b) {
this.alx = a;
this.wd("IsTransitionInEnabled", b, this.aly);
}
}
get alo() {
return this.aln;
}
set alo(a) {
let b = this.alo;
if (a != b) {
this.aln = a;
this.wd("TransitionInMode", enumGetBox(CategoryTransitionInMode_$type, b), enumGetBox(CategoryTransitionInMode_$type, this.alo));
}
}
get als() {
return this.alr;
}
set als(a) {
let b = this.als;
if (a != b) {
this.alr = a;
this.wd("TransitionInSpeedType", enumGetBox(TransitionInSpeedType_$type, b), enumGetBox(TransitionInSpeedType_$type, this.als));
}
}
}
DataPieChart.$t = markType(DataPieChart, 'DataPieChart', DataPieBaseChart.$);
return DataPieChart;
})();