igniteui-angular-charts
Version:
Ignite UI Angular charting components for building rich data visualizations for modern web apps.
74 lines (73 loc) • 2.99 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 { Base, Point_$type, markType } from "igniteui-angular-core";
import { LegendItemHelper } from "igniteui-angular-core";
import { RenderingContext } from "igniteui-angular-core";
import { EllipseGeometry } from "igniteui-angular-core";
import { Path } from "igniteui-angular-core";
import { CanvasViewRenderer } from "igniteui-angular-core";
import { DeviceUtils } from "igniteui-angular-core";
import { isNaN_ } from "igniteui-angular-core";
/**
* @hidden
*/
var FunnelLegendTemplates = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(FunnelLegendTemplates, _super);
function FunnelLegendTemplates() {
return _super !== null && _super.apply(this, arguments) || this;
}
FunnelLegendTemplates.e = function (a) {
var b = a.data;
var c = b.series;
var d = c.legendItemBadgeTemplate;
var e = b.itemLabel;
if (e == null) {
e = "Funnel Item";
}
LegendItemHelper.c(a.context, a.xPosition, a.yPosition, a.availableWidth, a.availableHeight, a.data, e.toString(), d, a.passInfo);
};
FunnelLegendTemplates.d = function (a) {
var b = a.data;
var c = a.context;
if (b.itemBrush != null) {
b.actualItemBrush = b.itemBrush;
}
var d = new RenderingContext(new CanvasViewRenderer(), c);
var e = DeviceUtils.g(9);
var f = DeviceUtils.g(9);
var g = e / 2;
var h = f / 2;
var i = FunnelLegendTemplates.a(g, e, a.availableWidth);
var j = FunnelLegendTemplates.b(h, f, a.availableHeight);
var k = new EllipseGeometry();
k.e = { $type: Point_$type, x: i, y: j };
k.c = g;
k.d = h;
var l = new Path();
l.an = k;
l._fill = b.actualItemBrush;
l._stroke = b.outline;
l.ad = isNaN_(b.thickness) ? 1 : b.thickness;
d.t(l);
};
FunnelLegendTemplates.c = function (a) {
};
FunnelLegendTemplates.f = function (a) {
};
FunnelLegendTemplates.a = function (a, b, c) {
var d = (c - b) / 2;
return a + d;
};
FunnelLegendTemplates.b = function (a, b, c) {
var d = (c - b) / 2;
return a + d;
};
FunnelLegendTemplates.$t = markType(FunnelLegendTemplates, 'FunnelLegendTemplates');
return FunnelLegendTemplates;
}(Base));
export { FunnelLegendTemplates };