igniteui-react-charts
Version:
Ignite UI React charting components for building rich data visualizations using TypeScript APIs.
297 lines (296 loc) • 9.44 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 {
vd() {
super.vd();
if (this.dataChart == null) {
return;
}
let a = this.dataChart.c9.j.e();
if (this.agn == null) {
this.agn = a.k;
}
if (this.agu == null) {
this.agu = a.k;
}
this.acm = 0;
this.agv = BrushUtil.h(0, 0, 0, 0);
this.agy = BrushUtil.h(0, 0, 0, 0);
this.agr = BrushUtil.h(0, 0, 0, 0);
this.ago = BrushUtil.h(0, 0, 0, 0);
this.ab1 = 0;
this.ags = BrushUtil.h(0, 0, 0, 0);
this.ab2 = AxisDefaults.e;
this.ag9 = 1;
this.aha = 1;
this.crosshairsDisplayMode = 1;
this.gq = true;
this.jq = Defaults.j;
this.yo = Defaults.ae;
this.yj = Defaults.af;
this.yk = Defaults.ag;
this.autoCalloutsVisible = true;
this.ho = true;
this.g6 = false;
this.he = false;
this.bz = 1;
this.bv = 11;
this.ak8 = true;
this.yd = BrushUtil.h(255, 255, 255, 255);
this.jp = DeviceUtils.g(2);
this.go = true;
this.gm = true;
this.gj = true;
this.dl = 4;
this.dj = 4;
}
vf(a, b) {
super.vf(a, b);
a.ke = this.alb;
a.kf = this.alc;
a.df = this.ak5;
a.dg = this.ak6;
}
v7(a, b, c) {
super.v7(a, b, c);
switch (a) {
case "TransitionInDuration":
this.u2((d) => d.ke = this.alb);
break;
case "TransitionOutDuration":
this.u2((d) => d.kf = this.alc);
break;
case "TransitionInEasingFunction":
this.u2((d) => d.df = this.ak5);
break;
case "TransitionOutEasingFunction":
this.u2((d) => d.dg = this.ak6);
break;
}
}
get alb() {
return this.ak9;
}
set alb(a) {
let b = this.alb;
if (a != b) {
this.ak9 = a;
this.v3("TransitionInDuration", b, this.alb);
}
}
get alc() {
return this.ala;
}
set alc(a) {
let b = this.alc;
if (a != b) {
this.ala = a;
this.v3("TransitionOutDuration", b, this.alc);
}
}
get ak5() {
return this.ak3;
}
set ak5(a) {
let b = this.ak5;
if (a != b) {
this.ak3 = a;
this.v3("TransitionInEasingFunction", b, this.ak5);
}
}
get ak6() {
return this.ak4;
}
set ak6(a) {
let b = this.ak6;
if (a != b) {
this.ak4 = a;
this.v3("TransitionOutEasingFunction", b, this.ak6);
}
}
ale() {
let cvd_ = this.lz();
cvd_.scaleByViewport();
return (cvd_.serialize());
}
constructor() {
super();
this.ak9 = 1000;
this.ala = 1000;
this.ak3 = null;
this.ak4 = null;
this.akz = 0;
this.ak7 = true;
this.akx = 0;
this.ak1 = 3;
this.ut();
}
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_ah9() {
return false;
}
be(a) {
if (this.ak0 == 0) {
return a.suggestedSeries;
}
if (this.ak0 == 1) {
return 35;
}
return 35;
}
dc(a, b) {
let c = super.dc(a, b);
return c;
}
u8(a, b) {
super.u8(a, b);
}
ve(a, b) {
super.ve(a, b);
let c = typeCast(RadialBase.$, a);
if (c == null) {
return;
}
c.zv = this.ak8;
c.y5 = this.aky;
c.c6 = this.ak2;
}
ui(a, b) {
super.ui(a, b);
let c = typeCast(RadialPieSeries.$, a);
if (c != null) {
c.xc = this.c2(a, b);
}
}
c1(a) {
return 13;
}
v3(a, b, c) {
super.v3(a, b, c);
switch (a) {
case "ChartType":
this.uz();
break;
case "IsTransitionInEnabled":
this.ux((d) => {
let e = typeCast(RadialBase.$, d);
if (e == null) {
return;
}
e.zv = c;
});
break;
case "TransitionInMode":
this.ux((d) => {
let e = typeCast(RadialBase.$, d);
if (e == null) {
return;
}
e.y5 = EnumUtil.getEnumValue(CategoryTransitionInMode_$type, c);
});
break;
case "TransitionInSpeedType":
this.ux((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 ak0() {
return this.akz;
}
set ak0(a) {
if (a != this.akz) {
let b = this.ak0;
this.akz = a;
this.v3("ChartType", enumGetBox(DataPieChartType_$type, b), enumGetBox(DataPieChartType_$type, this.ak0));
}
}
get ak8() {
return this.ak7;
}
set ak8(a) {
let b = this.ak8;
if (a != b) {
this.ak7 = a;
this.v3("IsTransitionInEnabled", b, this.ak8);
}
}
get aky() {
return this.akx;
}
set aky(a) {
let b = this.aky;
if (a != b) {
this.akx = a;
this.v3("TransitionInMode", enumGetBox(CategoryTransitionInMode_$type, b), enumGetBox(CategoryTransitionInMode_$type, this.aky));
}
}
get ak2() {
return this.ak1;
}
set ak2(a) {
let b = this.ak2;
if (a != b) {
this.ak1 = a;
this.v3("TransitionInSpeedType", enumGetBox(TransitionInSpeedType_$type, b), enumGetBox(TransitionInSpeedType_$type, this.ak2));
}
}
}
DataPieChart.$t = /*@__PURE__*/ markType(DataPieChart, 'DataPieChart', DataPieBaseChart.$);
return DataPieChart;
})();