UNPKG

igniteui-angular-charts

Version:

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

122 lines (121 loc) 4.33 kB
import { IgxSeriesComponent } from "./igx-series-component"; import { IgxSeriesMatcher } from "./igx-series-matcher"; import { ChartSelection as ChartSelection_internal } from "./ChartSelection"; /** * Represents a selected item within the chart. This should be treated as immutable while in the selected items collection. Changes while part of the collection will not be respected. */ var IgxChartSelection = /** @class */ /*@__PURE__*/ (function () { function IgxChartSelection() { this._implementation = this.createImplementation(); this._implementation.externalObject = this; this.onImplementationCreated(); if (this._initializeAdapters) { this._initializeAdapters(); } } IgxChartSelection.prototype.createImplementation = function () { return new ChartSelection_internal(); }; Object.defineProperty(IgxChartSelection.prototype, "i", { /** * @hidden */ get: function () { return this._implementation; }, enumerable: false, configurable: true }); IgxChartSelection.prototype.onImplementationCreated = function () { }; IgxChartSelection.prototype._provideImplementation = function (i) { this._implementation = i; this._implementation.externalObject = this; this.onImplementationCreated(); }; Object.defineProperty(IgxChartSelection.prototype, "item", { get: function () { return this.i.item; }, set: function (v) { this.i.item = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgxChartSelection.prototype, "series", { get: function () { var r = this.i.series; if (r == null) { return null; } if (!r.externalObject) { var e = IgxSeriesComponent._createFromInternal(r); if (e) { e._implementation = r; } r.externalObject = e; } return r.externalObject; }, set: function (v) { v == null ? this.i.series = null : this.i.series = v.i; }, enumerable: false, configurable: true }); Object.defineProperty(IgxChartSelection.prototype, "matcher", { /** * If set, allows for selecting a series based on a matcher. This should resolve to a single static series at the time that the chart selection is added to selected items. * It will not be re-evaluated while the ChartSelection is in the selected items. */ get: function () { var r = this.i.c; if (r == null) { return null; } if (!r.externalObject) { var e = new IgxSeriesMatcher(); if (r.$type) { e._implementation = r; } else { if (e.i.setNativeElement) { e.i.setNativeElement(r); } } r.externalObject = e; } return r.externalObject; }, set: function (v) { v == null ? this.i.c = null : this.i.c = v.i; }, enumerable: false, configurable: true }); IgxChartSelection.prototype.findByName = function (name) { if (this.findEphemera) { if (name && name.indexOf("@@e:") == 0) { return this.findEphemera(name); } } if (this.series && this.series.name && this.series.name == name) { return this.series; } if (this.matcher && this.matcher.name && this.matcher.name == name) { return this.matcher; } return null; }; IgxChartSelection.prototype.equals = function (other) { var iv = this.i.equals(other); return (iv); }; IgxChartSelection.prototype.getHashCode = function () { var iv = this.i.getHashCode(); return (iv); }; return IgxChartSelection; }()); export { IgxChartSelection };