igniteui-react-charts
Version:
Ignite UI React charting components for building rich data visualizations using TypeScript APIs.
344 lines (343 loc) • 11.3 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-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
*/
var DataPieChart = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(DataPieChart, _super);
function DataPieChart() {
var _this = _super.call(this) || this;
_this.al5 = 1000;
_this.al6 = 1000;
_this.alz = null;
_this.al0 = null;
_this.alv = 0;
_this.al3 = true;
_this.alt = 0;
_this.alx = 3;
_this.u8();
return _this;
}
DataPieChart.prototype.vs = function () {
_super.prototype.vs.call(this);
if (this.dataChart == null) {
return;
}
var a = this.dataChart.dc.j.e();
if (this.ahf == null) {
this.ahf = a.k;
}
if (this.ahm == null) {
this.ahm = a.k;
}
this.ada = 0;
this.ahn = BrushUtil.j(0, 0, 0, 0);
this.ahq = BrushUtil.j(0, 0, 0, 0);
this.ahj = BrushUtil.j(0, 0, 0, 0);
this.ahg = BrushUtil.j(0, 0, 0, 0);
this.acn = 0;
this.ahk = BrushUtil.j(0, 0, 0, 0);
this.aco = AxisDefaults.axis_TickStroke;
this.ah1 = 1;
this.ah2 = 1;
this.crosshairsDisplayMode = 1;
this.gu = true;
this.ju = Defaults.crosshairLineThickness;
this.y4 = Defaults.crosshairLineBrush;
this.yz = Defaults.crosshairXAxisAnnotationBackground;
this.y0 = Defaults.crosshairXAxisAnnotationTextColor;
this.autoCalloutsVisible = true;
this.hs = true;
this.ha = false;
this.hi = false;
this.bz = 1;
this.bv = 11;
this.al4 = true;
this.yt = BrushUtil.j(255, 255, 255, 255);
this.jt = DeviceUtils.g(2);
this.gq = true;
this.go = true;
this.gl = true;
this.dl = 4;
this.dj = 4;
};
DataPieChart.prototype.vu = function (a, b) {
_super.prototype.vu.call(this, a, b);
a.kf = this.al7;
a.kg = this.al8;
a.df = this.al1;
a.dg = this.al2;
};
DataPieChart.prototype.wn = function (a, b, c) {
var _this = this;
_super.prototype.wn.call(this, a, b, c);
switch (a) {
case "TransitionInDuration":
this.vh(function (d) { return d.kf = _this.al7; });
break;
case "TransitionOutDuration":
this.vh(function (d) { return d.kg = _this.al8; });
break;
case "TransitionInEasingFunction":
this.vh(function (d) { return d.df = _this.al1; });
break;
case "TransitionOutEasingFunction":
this.vh(function (d) { return d.dg = _this.al2; });
break;
}
};
Object.defineProperty(DataPieChart.prototype, "al7", {
get: function () {
return this.al5;
},
set: function (a) {
var b = this.al7;
if (a != b) {
this.al5 = a;
this.wj("TransitionInDuration", b, this.al7);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(DataPieChart.prototype, "al8", {
get: function () {
return this.al6;
},
set: function (a) {
var b = this.al8;
if (a != b) {
this.al6 = a;
this.wj("TransitionOutDuration", b, this.al8);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(DataPieChart.prototype, "al1", {
get: function () {
return this.alz;
},
set: function (a) {
var b = this.al1;
if (a != b) {
this.alz = a;
this.wj("TransitionInEasingFunction", 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.wj("TransitionOutEasingFunction", b, this.al2);
}
},
enumerable: false,
configurable: true
});
DataPieChart.prototype.ama = function () {
var cvd_ = this.l9();
cvd_.scaleByViewport();
return (cvd_.serialize());
};
DataPieChart.prototype.get_h6 = function () {
return ((function () {
var $ret = new List$1(DataSeriesType_$type, 0);
$ret.add(35);
return $ret;
})());
};
Object.defineProperty(DataPieChart.prototype, "h6", {
get: function () {
return this.get_h6();
},
enumerable: false,
configurable: true
});
DataPieChart.prototype.get_h5 = 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, "h5", {
get: function () {
return this.get_h5();
},
enumerable: false,
configurable: true
});
DataPieChart.prototype.get_ai4 = function () {
return false;
};
DataPieChart.prototype.be = function (a) {
if (this.alw == 0) {
return a.suggestedSeries;
}
if (this.alw == 1) {
return 35;
}
return 35;
};
DataPieChart.prototype.dc = function (a, b) {
var c = _super.prototype.dc.call(this, a, b);
return c;
};
DataPieChart.prototype.vn = function (a, b) {
_super.prototype.vn.call(this, a, b);
};
DataPieChart.prototype.vt = function (a, b) {
_super.prototype.vt.call(this, a, b);
var c = typeCast(RadialBase.$, a);
if (c == null) {
return;
}
c.zw = this.al4;
c.y8 = this.alu;
c.c6 = this.aly;
};
DataPieChart.prototype.ux = function (a, b) {
_super.prototype.ux.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.wj = function (a, b, c) {
_super.prototype.wj.call(this, a, b, c);
switch (a) {
case "ChartType":
this.ve();
break;
case "IsTransitionInEnabled":
this.vc(function (d) {
var e = typeCast(RadialBase.$, d);
if (e == null) {
return;
}
e.zw = c;
});
break;
case "TransitionInMode":
this.vc(function (d) {
var e = typeCast(RadialBase.$, d);
if (e == null) {
return;
}
e.y8 = EnumUtil.getEnumValue(CategoryTransitionInMode_$type, c);
});
break;
case "TransitionInSpeedType":
this.vc(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, "alw", {
get: function () {
return this.alv;
},
set: function (a) {
if (a != this.alv) {
var b = this.alw;
this.alv = a;
this.wj("ChartType", enumGetBox(DataPieChartType_$type, b), enumGetBox(DataPieChartType_$type, this.alw));
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(DataPieChart.prototype, "al4", {
get: function () {
return this.al3;
},
set: function (a) {
var b = this.al4;
if (a != b) {
this.al3 = a;
this.wj("IsTransitionInEnabled", b, this.al4);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(DataPieChart.prototype, "alu", {
get: function () {
return this.alt;
},
set: function (a) {
var b = this.alu;
if (a != b) {
this.alt = a;
this.wj("TransitionInMode", enumGetBox(CategoryTransitionInMode_$type, b), enumGetBox(CategoryTransitionInMode_$type, this.alu));
}
},
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.wj("TransitionInSpeedType", enumGetBox(TransitionInSpeedType_$type, b), enumGetBox(TransitionInSpeedType_$type, this.aly));
}
},
enumerable: false,
configurable: true
});
DataPieChart.$t = markType(DataPieChart, 'DataPieChart', DataPieBaseChart.$);
return DataPieChart;
}(DataPieBaseChart));
export { DataPieChart };