igniteui-angular-charts
Version:
Ignite UI Angular charting components for building rich data visualizations for modern web apps.
263 lines (262 loc) • 9.47 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-angular-core";
import { CategoryLineRasterizer } from "./CategoryLineRasterizer";
import { UnknownValuePlotting_$type } from "igniteui-angular-core";
import { DependencyProperty } from "igniteui-angular-core";
import { typeCast, runOn, enumGetBox, markType, markDep } from "igniteui-angular-core";
import { List$1 } from "igniteui-angular-core";
import { Path } from "igniteui-angular-core";
import { ScalerParams } from "./ScalerParams";
import { ChartSelection } from "./ChartSelection";
import { PropertyMetadata } from "igniteui-angular-core";
import { AnchoredCategorySeriesView } from "./AnchoredCategorySeriesView";
import { Defaults } from "./Defaults";
import { ISortingAxis_$type } from "./ISortingAxis";
import { Color } from "igniteui-angular-core";
/**
* @hidden
*/
var AreaSeries = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(AreaSeries, _super);
function AreaSeries() {
var _this = _super.call(this) || this;
_this.acw = null;
_this.acw = new CategoryLineRasterizer();
_this.ab = AreaSeries.$;
_this.acf = 0;
return _this;
}
AreaSeries.prototype.bj = function () {
return new AreaSeries();
};
AreaSeries.prototype.cs = function () {
return new AreaSeriesView(this);
};
AreaSeries.prototype.y3 = function () {
return 1;
};
AreaSeries.prototype.cy = function () {
if (this.cz == 0) {
return 2;
}
return _super.prototype.cy.call(this);
};
AreaSeries.prototype.q0 = function (a) {
_super.prototype.q0.call(this, a);
this.acv = a;
};
AreaSeries.prototype.get_ev = function () {
return true;
};
AreaSeries.prototype.get_eu = function () {
return true;
};
AreaSeries.prototype.preferredCategoryMode = function (a) {
return this.acf;
};
AreaSeries.prototype.gv = function (a, b) {
var c = this.wb(this.wg(a), true, false);
if (this.acm(a, c, b)) {
return true;
}
if (this.gu(a, b)) {
return true;
}
if (this.xg(a, b)) {
return true;
}
return false;
};
AreaSeries.prototype.o4 = function (a, b) {
_super.prototype.o4.call(this, a, b);
var c = b;
c.dg();
};
AreaSeries.prototype.aaj = function (a, b) {
var _this = this;
_super.prototype.aaj.call(this, a, b);
var c = b.cw.d;
var d = typeCast(AreaSeriesView.$, b);
var e = a.f;
var f = this.getEffectiveViewport1(d);
this.y1.a2(this, this.zl(), runOn(this, this.yl), this.zu(b), this.zv(b));
var g = false;
var h = this.y1.b;
if (h != null) {
g = true;
}
if (g) {
var i = new ScalerParams(0, b.by, b.bx, this.acc.ch, f);
this.aaf(e, -1, this.valueColumn.count, this.acc, i, b.q, -1);
}
var j = d.ds;
var k = d.dt;
var l = d.du;
var m = d.dv;
this.y1.ad(j, true, false, true, true);
this.y1.ad(k, true, false, true, true);
this.y1.ad(l, false, true, false, false);
this.y1.ad(m, false, true, false, false);
if (b.c0(a)) {
d.di(e.count, e, true, c, this.ic, function (n, o, p, q, r) { return _this.abs(n, a.f.count, b); }, this.unknownValuePlotting, e.count == 1 ? null : this.aat(e, e.count - 1, b.bx, b.by, true));
b.c3(a);
}
var n = this.fetchYAxis();
l._opacity = this.y1.j * this.h8;
m._opacity = 0.5 * this.y1.j * this.h8;
};
AreaSeries.prototype.q8 = function (a, b, c, d) {
_super.prototype.q8.call(this, a, b, c, d);
switch (b) {
case AreaSeries.$$p[0]:
this.yy.m = this.unknownValuePlotting == 0;
this.rq(false);
this.qk();
break;
}
};
AreaSeries.prototype.ak = function (a, b) {
var c = new List$1(ChartSelection.$, 0);
this.p3(a, c, b);
return c.toArray();
};
AreaSeries.prototype.p3 = function (a, b, c) {
this.aab(a, b, c, this.ys, 0);
};
Object.defineProperty(AreaSeries.prototype, "useHighMarkerFidelity", {
get: function () {
return this.zp;
},
enumerable: false,
configurable: true
});
AreaSeries.$t = markType(AreaSeries, 'AreaSeries', HorizontalAnchoredCategorySeries.$, [IUnknownValuePlotting_$type]);
AreaSeries.$$p = markDep(DependencyProperty, PropertyMetadata, AreaSeries, 'raisePropertyChanged', ['UnknownValuePlotting::acy', [UnknownValuePlotting_$type, enumGetBox(UnknownValuePlotting_$type, 1)]]);
return AreaSeries;
}(HorizontalAnchoredCategorySeries));
export { AreaSeries };
/**
* @hidden
*/
var AreaSeriesView = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(AreaSeriesView, _super);
function AreaSeriesView(a) {
var _this = _super.call(this, a) || this;
_this.df = null;
_this.dn = new Path();
_this.dq = new Path();
_this.dp = new Path();
_this.dr = new Path();
_this.dj = new Path();
_this.dl = new Path();
_this.dk = new Path();
_this.dm = new Path();
_this.df = a;
return _this;
}
AreaSeriesView.prototype.au = function () {
_super.prototype.au.call(this);
if (!this.q) {
this.df.w9 = Defaults.e;
}
};
Object.defineProperty(AreaSeriesView.prototype, "ds", {
get: function () {
return this.dq;
},
enumerable: false,
configurable: true
});
Object.defineProperty(AreaSeriesView.prototype, "dt", {
get: function () {
return this.dr;
},
enumerable: false,
configurable: true
});
Object.defineProperty(AreaSeriesView.prototype, "du", {
get: function () {
return this.dn;
},
enumerable: false,
configurable: true
});
Object.defineProperty(AreaSeriesView.prototype, "dv", {
get: function () {
return this.dp;
},
enumerable: false,
configurable: true
});
AreaSeriesView.prototype.dg = function () {
this.dn.an = null;
this.dp.an = null;
this.dq.an = null;
this.dr.an = null;
this.as();
};
AreaSeriesView.prototype.dh = function (a, b, c, d, e, f, g) {
this.di(a, b, c, d, e, f, g, null);
};
AreaSeriesView.prototype.di = function (a, b, c, d, e, f, g, h) {
this.df.acw.a = typeCast(ISortingAxis_$type, this.cy.fetchXAxis()) !== null ? true : false;
this.df.acw.j(this.dn, this.dq, this.dp, this.dr, a, b, c, d, e, f, g, h);
this.as();
};
AreaSeriesView.prototype.be = function () {
_super.prototype.be.call(this);
this.dj.an = this.dn.an;
this.dl.an = this.dq.an;
this.dk.an = this.dp.an;
this.dm.an = this.dr.an;
var a = this.br();
this.dj._fill = a;
this.dj._opacity = 1;
this.dk._fill = a;
this.dk._opacity = 1;
this.dl._stroke = a;
this.dl.ad = this.e.id + 3;
this.dm._stroke = a;
this.dm.ad = this.e.id + 3;
};
AreaSeriesView.prototype.a8 = function (a, b) {
_super.prototype.a8.call(this, a, b);
if (b) {
a.t(this.dj);
a.t(this.dk);
a.t(this.dl);
a.t(this.dm);
}
else {
a.t(this.dn);
a.t(this.dp);
a.t(this.dq);
a.t(this.dr);
}
};
AreaSeriesView.prototype.an = function (a) {
_super.prototype.an.call(this, a);
this.e.bc.exportPathData(a, this.dq, "lowerShape", ["Lower"]);
this.e.bc.exportPathData(a, this.dr, "upperShape", ["Upper", "Main"]);
this.e.bc.exportPathData(a, this.dp, "translucentShape", ["Translucent"]);
this.e.bc.exportPathData(a, this.dn, "fillShape", ["Fill"]);
};
AreaSeriesView.prototype.af = function () {
var a = new Color();
a.colorString = "rgba(95,95,95,0.5)";
this.e.v0 = a;
this.e.jl = 5;
this.e.jm = 1;
this.e.jn = -3;
};
AreaSeriesView.$t = markType(AreaSeriesView, 'AreaSeriesView', AnchoredCategorySeriesView.$);
return AreaSeriesView;
}(AnchoredCategorySeriesView));
export { AreaSeriesView };