UNPKG

igniteui-angular-charts

Version:

Ignite UI Angular charting components for building rich data visualizations for modern web apps.

70 lines (69 loc) 2.8 kB
/* 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 { 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 */ export let FunnelLegendTemplates = /*@__PURE__*/ (() => { class FunnelLegendTemplates extends Base { static e(a) { let b = a.data; let c = b.series; let d = c.legendItemBadgeTemplate; let 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); } static d(a) { let b = a.data; let c = a.context; if (b.itemBrush != null) { b.actualItemBrush = b.itemBrush; } let d = new RenderingContext(new CanvasViewRenderer(), c); let e = DeviceUtils.g(9); let f = DeviceUtils.g(9); let g = e / 2; let h = f / 2; let i = FunnelLegendTemplates.a(g, e, a.availableWidth); let j = FunnelLegendTemplates.b(h, f, a.availableHeight); let k = new EllipseGeometry(); k.e = { $type: Point_$type, x: i, y: j }; k.c = g; k.d = h; let 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); } static c(a) { } static f(a) { } static a(a, b, c) { let d = (c - b) / 2; return a + d; } static b(a, b, c) { let d = (c - b) / 2; return a + d; } } FunnelLegendTemplates.$t = markType(FunnelLegendTemplates, 'FunnelLegendTemplates'); return FunnelLegendTemplates; })();