UNPKG

igniteui-angular-charts

Version:

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

90 lines (89 loc) 4.49 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 { CategoryFramePreparer } from "./CategoryFramePreparer"; import { ISupportsMarkers_$type } from "./ISupportsMarkers"; import { IProvidesViewport_$type } from "./IProvidesViewport"; import { ISupportsErrorBars_$type } from "./ISupportsErrorBars"; import { IBucketizer_$type } from "./IBucketizer"; import { DefaultCategoryTrendlineHost } from "./DefaultCategoryTrendlineHost"; import { IHasCategoryTrendline_$type } from "./IHasCategoryTrendline"; import { DefaultSingleValueProvider } from "./DefaultSingleValueProvider"; import { IHasSingleValueCategory_$type } from "./IHasSingleValueCategory"; import { Rect } from "igniteui-angular-core"; import { typeCast, Point_$type, markType } from "igniteui-angular-core"; import { isNaN_, isInfinity } from "igniteui-angular-core"; /** * @hidden */ export let BarFramePreparer = /*@__PURE__*/ (() => { class BarFramePreparer extends CategoryFramePreparer { constructor(a, ..._rest) { a = (a == void 0) ? 0 : a; switch (a) { case 0: { let c = _rest[0]; let d = [c, typeCast(ISupportsMarkers_$type, c), typeCast(IProvidesViewport_$type, c), typeCast(ISupportsErrorBars_$type, c), typeCast(IBucketizer_$type, c)]; { let f = d[0]; let g = d[1]; let h = d[2]; let i = d[3]; let j = d[4]; super(1, f, g, h, i, j); this.ac = new DefaultCategoryTrendlineHost(); if (typeCast(IHasCategoryTrendline_$type, f) !== null) { this.ac = typeCast(IHasCategoryTrendline_$type, f); } this.ad = new DefaultSingleValueProvider(); if (typeCast(IHasSingleValueCategory_$type, f) !== null) { this.ad = typeCast(IHasSingleValueCategory_$type, f); } } } break; case 1: { let c = _rest[0]; let d = _rest[1]; let e = _rest[2]; let f = _rest[3]; let g = _rest[4]; super(1, c, d, e, f, g); this.ac = new DefaultCategoryTrendlineHost(); if (typeCast(IHasCategoryTrendline_$type, c) !== null) { this.ac = typeCast(IHasCategoryTrendline_$type, c); } this.ad = new DefaultSingleValueProvider(); if (typeCast(IHasSingleValueCategory_$type, c) !== null) { this.ad = typeCast(IHasSingleValueCategory_$type, c); } } break; } } l(a, b, c, d, e, f) { let g = b[1]; let h = b[0]; let i = new Rect(0, g - 5, h - 5, 11, 11); if (!isNaN_(g) && !isNaN_(h) && !isInfinity(g) && !isInfinity(h) && c.tryAdd(i)) { a.s.add({ $type: Point_$type, x: g, y: h }); this.c.updateMarkerTemplate(e, d, f); return true; } return false; } w(a, b, c) { if (this.ac.trendLineType == 0 || this.ac.trendlinePreparer == null || this.ac.trendLinePeriod < 1) { return; } this.ac.trendlinePreparer.prepareLine(this.ac, a, b, c); } } BarFramePreparer.$t = markType(BarFramePreparer, 'BarFramePreparer', CategoryFramePreparer.$); return BarFramePreparer; })();