UNPKG

igniteui-react-charts

Version:

Ignite UI React charting components for building rich data visualizations using TypeScript APIs.

106 lines (105 loc) 2.94 kB
import { IgrChartGroupDescription } from "./igr-chart-group-description"; import { ChartGroupDescriptionCollection as ChartGroupDescriptionCollection_internal } from "./ChartGroupDescriptionCollection"; /** * Represents a collection of grouping elements that are applied to a data source or provider. */ export class IgrChartGroupDescriptionCollection { createImplementation() { return new ChartGroupDescriptionCollection_internal(); } get i() { return this._implementation; } onImplementationCreated() { } constructor() { this._implementation = this.createImplementation(); this._implementation.externalObject = this; this.onImplementationCreated(); } _provideImplementation(i) { this._implementation = i; this._implementation.externalObject = this; this.onImplementationCreated(); } item(index, value) { let int = null; if (value !== undefined) { int = this.i.set(index, value == null ? null : value.i); } else { int = this.i.get(index); } let ext = null; if (int != null) { ext = int.externalObject; if (!ext) { ext = new IgrChartGroupDescription(); ext._implementation = int; int.externalObject = ext; } } return ext; } get count() { return this.i.size(); } toArray() { let arr = []; for (let i = 0; i < this.count; i++) { arr[i] = this.item(i); } return arr; } *[Symbol.iterator]() { for (let i = 0; i < this.count; i++) { let item = this.item(i); if (item.externalObject) { item = item.externalObject; } yield item; } } findByName(name) { if (this.findEphemera) { if (name && name.indexOf("@@e:") == 0) { return this.findEphemera(name); } } return null; } add(item) { let iv = this.i.g((item == null ? null : item.i)); return (iv); } insert(index, item) { this.i.n(index, (item == null ? null : item.i)); } clear() { this.i.m(); } indexOf(item) { let iv = this.i.j((item == null ? null : item.i)); return (iv); } remove(item) { let iv = this.i.h((item == null ? null : item.i)); return (iv); } removeAt(index) { let iv = this.i.b(index); let ret = null; if (iv && iv.externalObject) { ret = iv.externalObject; } else { if (iv) { let e = new IgrChartGroupDescription(); e._implementation = iv; iv.externalObject = e; ret = e; } } return ret; } }