igniteui-react-charts
Version:
Ignite UI React charting components for building rich data visualizations using TypeScript APIs.
297 lines (296 loc) • 9.56 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-react-core";
import { List$1 } from "igniteui-react-core";
import { DataSeriesType_$type } from "igniteui-react-core";
import { IDataSeriesAdapterRule_$type } from "igniteui-react-core";
import { SimplePieSeriesRule } from "igniteui-react-core";
import { SubCollectionsRule } from "igniteui-react-core";
import { DataPieChartType_$type } from "./DataPieChartType";
import { CategoryTransitionInMode_$type } from "./CategoryTransitionInMode";
import { TransitionInSpeedType_$type } from "./TransitionInSpeedType";
import { BrushUtil } from "igniteui-react-core";
import { AxisDefaults } from "./AxisDefaults";
import { Defaults } from "./Defaults";
import { DeviceUtils } from "igniteui-react-core";
import { RadialBase } from "./RadialBase";
import { RadialPieSeries } from "./RadialPieSeries";
/**
* @hidden
*/
export let DataPieChart = /*@__PURE__*/ (() => {
class DataPieChart extends DataPieBaseChart {
v9() {
super.v9();
if (this.dataChart == null) {
return;
}
let 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;
}
wb(a, b) {
super.wb(a, b);
a.kn = this.am8;
a.ko = this.am9;
a.df = this.am2;
a.dg = this.am3;
}
w5(a, b, c) {
super.w5(a, b, c);
switch (a) {
case "TransitionInDuration":
this.vy((d) => d.kn = this.am8);
break;
case "TransitionOutDuration":
this.vy((d) => d.ko = this.am9);
break;
case "TransitionInEasingFunction":
this.vy((d) => d.df = this.am2);
break;
case "TransitionOutEasingFunction":
this.vy((d) => d.dg = this.am3);
break;
}
}
get am8() {
return this.am6;
}
set am8(a) {
let b = this.am8;
if (a != b) {
this.am6 = a;
this.w1("TransitionInDuration", b, this.am8);
}
}
get am9() {
return this.am7;
}
set am9(a) {
let b = this.am9;
if (a != b) {
this.am7 = a;
this.w1("TransitionOutDuration", b, this.am9);
}
}
get am2() {
return this.am0;
}
set am2(a) {
let b = this.am2;
if (a != b) {
this.am0 = a;
this.w1("TransitionInEasingFunction", b, this.am2);
}
}
get am3() {
return this.am1;
}
set am3(a) {
let b = this.am3;
if (a != b) {
this.am1 = a;
this.w1("TransitionOutEasingFunction", b, this.am3);
}
}
anb() {
let cvd_ = this.mj();
cvd_.scaleByViewport();
return (cvd_.serialize());
}
constructor() {
super();
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();
}
get_ie() {
return ((() => {
let $ret = new List$1(DataSeriesType_$type, 0);
$ret.add(35);
return $ret;
})());
}
get ie() {
return this.get_ie();
}
get_id() {
return ((() => {
let $ret = new List$1(IDataSeriesAdapterRule_$type, 0);
$ret.add(new SimplePieSeriesRule());
$ret.add(new SubCollectionsRule());
return $ret;
})());
}
get id() {
return this.get_id();
}
get_aju() {
return false;
}
bf(a) {
if (this.amx == 0) {
return a.suggestedSeries;
}
if (this.amx == 1) {
return 35;
}
return 35;
}
de(a, b) {
let c = super.de(a, b);
return c;
}
v4(a, b) {
super.v4(a, b);
}
wa(a, b) {
super.wa(a, b);
let c = typeCast(RadialBase.$, a);
if (c == null) {
return;
}
c.aac = this.am5;
c.zo = this.amv;
c.c6 = this.amz;
}
vb(a, b) {
super.vb(a, b);
let c = typeCast(RadialPieSeries.$, a);
if (c != null) {
c.xv = this.c4(a, b);
}
}
c3(a) {
return 13;
}
w1(a, b, c) {
super.w1(a, b, c);
switch (a) {
case "ChartType":
this.vv();
break;
case "IsTransitionInEnabled":
this.vt((d) => {
let e = typeCast(RadialBase.$, d);
if (e == null) {
return;
}
e.aac = c;
});
break;
case "TransitionInMode":
this.vt((d) => {
let e = typeCast(RadialBase.$, d);
if (e == null) {
return;
}
e.zo = EnumUtil.getEnumValue(CategoryTransitionInMode_$type, c);
});
break;
case "TransitionInSpeedType":
this.vt((d) => {
let e = typeCast(RadialBase.$, d);
if (e == null) {
return;
}
e.c6 = EnumUtil.getEnumValue(TransitionInSpeedType_$type, c);
});
break;
}
}
get_cd() {
return 4;
}
get cd() {
return this.get_cd();
}
get amx() {
return this.amw;
}
set amx(a) {
if (a != this.amw) {
let b = this.amx;
this.amw = a;
this.w1("ChartType", enumGetBox(DataPieChartType_$type, b), enumGetBox(DataPieChartType_$type, this.amx));
}
}
get am5() {
return this.am4;
}
set am5(a) {
let b = this.am5;
if (a != b) {
this.am4 = a;
this.w1("IsTransitionInEnabled", b, this.am5);
}
}
get amv() {
return this.amu;
}
set amv(a) {
let b = this.amv;
if (a != b) {
this.amu = a;
this.w1("TransitionInMode", enumGetBox(CategoryTransitionInMode_$type, b), enumGetBox(CategoryTransitionInMode_$type, this.amv));
}
}
get amz() {
return this.amy;
}
set amz(a) {
let b = this.amz;
if (a != b) {
this.amy = a;
this.w1("TransitionInSpeedType", enumGetBox(TransitionInSpeedType_$type, b), enumGetBox(TransitionInSpeedType_$type, this.amz));
}
}
}
DataPieChart.$t = /*@__PURE__*/ markType(DataPieChart, 'DataPieChart', DataPieBaseChart.$);
return DataPieChart;
})();