igniteui-react-charts
Version:
Ignite UI React charting components for building rich data visualizations using TypeScript APIs.
235 lines (234 loc) • 8.21 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 { HorizontalAnchoredCategorySeries } from "./HorizontalAnchoredCategorySeries";
import { IUnknownValuePlotting_$type } from "igniteui-react-core";
import { CategoryLineRasterizer } from "./CategoryLineRasterizer";
import { UnknownValuePlotting_$type } from "igniteui-react-core";
import { DependencyProperty } from "igniteui-react-core";
import { typeCast, runOn, enumGetBox, markType, markDep } from "igniteui-react-core";
import { List$1 } from "igniteui-react-core";
import { Path } from "igniteui-react-core";
import { ScalerParams } from "./ScalerParams";
import { ChartSelection } from "./ChartSelection";
import { PropertyMetadata } from "igniteui-react-core";
import { AnchoredCategorySeriesView } from "./AnchoredCategorySeriesView";
import { Defaults } from "./Defaults";
import { ISortingAxis_$type } from "./ISortingAxis";
import { Color } from "igniteui-react-core";
/**
* @hidden
*/
var LineSeries = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(LineSeries, _super);
function LineSeries() {
var _this = _super.call(this) || this;
_this.ac3 = null;
_this.ac3 = new CategoryLineRasterizer();
_this.ab = LineSeries.$;
_this.acn = 0;
return _this;
}
LineSeries.prototype.bk = function () {
return new LineSeries();
};
LineSeries.prototype.get_fl = function () {
return true;
};
LineSeries.prototype.ct = function () {
return new LineSeriesView(this);
};
LineSeries.prototype.q3 = function (a) {
_super.prototype.q3.call(this, a);
this.ac4 = a;
};
LineSeries.prototype.zt = function () {
return true;
};
LineSeries.prototype.get_ex = function () {
return true;
};
LineSeries.prototype.preferredCategoryMode = function (a) {
return this.acn;
};
LineSeries.prototype.o7 = function (a, b) {
_super.prototype.o7.call(this, a, b);
var c = b;
c.du();
};
LineSeries.prototype.aas = function (a, b) {
_super.prototype.aas.call(this, a, b);
var c = b.c9.d;
var d = typeCast(LineSeriesView.$, b);
var e = a.h;
var f = this.getEffectiveViewport1(b);
this.y7.a2(this, this.zr(), runOn(this, this.yr), this.z0(b), this.z1(b));
var g = false;
var h = this.y7.b;
if (h != null) {
g = true;
}
if (g) {
var i = new ScalerParams(0, b.ca, b.b9, this.ack.ch, f);
this.aao(e, -1, this.valueColumn.count, this.ack, i, b.t, -1);
}
var j = d.d0;
var k = d.d1;
var l = d.dz;
this.y7.ad(j, true, false, true, false);
this.y7.ad(k, true, false, true, false);
this.y7.ad(l, false, true, false, false);
l._opacity = 0.75 * this.y7.j;
if (b.dd(a)) {
d.dv(e.count, e, true, this.unknownValuePlotting, this.aa0(e, e.count - 1, b.b9, b.ca), c, this.ie);
b.dg(a);
}
};
LineSeries.prototype.ak = function (a, b) {
var c = new List$1(ChartSelection.$, 0);
this.p6(a, c, b);
return c.toArray();
};
LineSeries.prototype.p6 = function (a, b, c) {
this.aak(a, b, c, this.yy, 0);
};
LineSeries.prototype.aah = function (a, b, c, d, e) {
var f = this.aai(a, b, c, d, e);
d = f.p3;
e = f.p4;
return {
p3: d,
p4: e
};
};
LineSeries.prototype.rc = function (a, b, c, d) {
_super.prototype.rc.call(this, a, b, c, d);
switch (b) {
case LineSeries.$$p[0]:
this.y4.m = this.unknownValuePlotting == 0;
this.ru(false);
this.qn();
break;
}
};
Object.defineProperty(LineSeries.prototype, "useHighMarkerFidelity", {
get: function () {
return this.zv;
},
enumerable: false,
configurable: true
});
LineSeries.$t = markType(LineSeries, 'LineSeries', HorizontalAnchoredCategorySeries.$, [IUnknownValuePlotting_$type]);
LineSeries.$$p = markDep(DependencyProperty, PropertyMetadata, LineSeries, 'raisePropertyChanged', ['UnknownValuePlotting::ac6', [UnknownValuePlotting_$type, enumGetBox(UnknownValuePlotting_$type, 1)]]);
return LineSeries;
}(HorizontalAnchoredCategorySeries));
export { LineSeries };
/**
* @hidden
*/
var LineSeriesView = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(LineSeriesView, _super);
function LineSeriesView(a) {
var _this = _super.call(this, a) || this;
_this.dt = null;
_this.d3 = new Path();
_this.d2 = new Path();
_this.d4 = new Path();
_this.dy = new Path();
_this.dx = new Path();
_this.dw = new Path();
_this.dt = a;
return _this;
}
LineSeriesView.prototype.a4 = function () {
_super.prototype.a4.call(this);
if (!this.t) {
this.dt.xf = Defaults.e;
}
};
Object.defineProperty(LineSeriesView.prototype, "d0", {
get: function () {
return this.d3;
},
enumerable: false,
configurable: true
});
Object.defineProperty(LineSeriesView.prototype, "d1", {
get: function () {
return this.d4;
},
enumerable: false,
configurable: true
});
Object.defineProperty(LineSeriesView.prototype, "dz", {
get: function () {
return this.d2;
},
enumerable: false,
configurable: true
});
LineSeriesView.prototype.du = function () {
this.d2.an = null;
this.d3.an = null;
this.d4.an = null;
this.a2();
};
LineSeriesView.prototype.dv = function (a, b, c, d, e, f, g) {
this.dt.ac3.a = typeCast(ISortingAxis_$type, this.db.fetchXAxis()) !== null ? true : false;
this.dt.ac3.m(this.d3, this.d2, this.d4, a, b, c, d, e, f, g);
this.a2();
};
LineSeriesView.prototype.bp = function () {
_super.prototype.bp.call(this);
};
LineSeriesView.prototype.bq = function () {
_super.prototype.bq.call(this);
this.dx.an = this.d3.an;
this.dy.an = this.d4.an;
this.dw.an = this.d2.an;
var a = this.b3();
this.dx._stroke = a;
this.dx.ad = this.f.ig + 3;
this.dy._stroke = a;
this.dy.ad = this.f.ig + 3;
this.dw._fill = a;
this.dw._opacity = 1;
};
LineSeriesView.prototype.bj = function (a, b) {
_super.prototype.bj.call(this, a, b);
if (a.d) {
if (b) {
a.t(this.dw);
a.t(this.dx);
a.t(this.dy);
}
else {
a.t(this.d2);
a.t(this.d3);
a.t(this.d4);
}
}
};
LineSeriesView.prototype.ax = function (a) {
_super.prototype.ax.call(this, a);
this.f.bc.exportPathData(a, this.d3, "lowerShape", ["Lower", "Main"]);
this.f.bc.exportPathData(a, this.d4, "upperShape", ["Upper"]);
this.f.bc.exportPathData(a, this.d2, "translucentShape", ["Translucent"]);
};
LineSeriesView.prototype.an = function () {
var a = new Color();
a.colorString = "rgba(95,95,95,0.5)";
this.f.v6 = a;
this.f.jn = 3;
this.f.jo = 1;
this.f.jp = 4;
this.f.hd = false;
};
LineSeriesView.$t = markType(LineSeriesView, 'LineSeriesView', AnchoredCategorySeriesView.$);
return LineSeriesView;
}(AnchoredCategorySeriesView));
export { LineSeriesView };