UNPKG

igniteui-angular-core

Version:

Ignite UI Angular Core logic used in multiple UI components.

104 lines (100 loc) 3.78 kB
import { IgxDataLegendSeriesValueInfo } from "./igx-data-legend-series-value-info"; import { DataLegendSeriesValueType_$type } from "./DataLegendSeriesValueType"; import { DataLegendSeriesContext as DataLegendSeriesContext_internal } from "./DataLegendSeriesContext"; import { ensureEnum } from "./componentUtil"; /** * Represent info about series values */ var IgxDataLegendSeriesContext = /** @class */ /*@__PURE__*/ (function () { function IgxDataLegendSeriesContext() { this._implementation = this.createImplementation(); this._implementation.externalObject = this; this.onImplementationCreated(); if (this._initializeAdapters) { this._initializeAdapters(); } } IgxDataLegendSeriesContext.prototype.createImplementation = function () { return new DataLegendSeriesContext_internal(); }; Object.defineProperty(IgxDataLegendSeriesContext.prototype, "i", { /** * @hidden */ get: function () { return this._implementation; }, enumerable: false, configurable: true }); IgxDataLegendSeriesContext.prototype.onImplementationCreated = function () { }; IgxDataLegendSeriesContext.prototype._provideImplementation = function (i) { this._implementation = i; this._implementation.externalObject = this; this.onImplementationCreated(); }; Object.defineProperty(IgxDataLegendSeriesContext.prototype, "seriesFamily", { /** * Gets a family of series that the current series belongs to, e.g. Category, Range, Financial, etc. */ get: function () { return this.i.h; }, set: function (v) { this.i.h = v; }, enumerable: false, configurable: true }); IgxDataLegendSeriesContext.prototype.findByName = function (name) { if (this.findEphemera) { if (name && name.indexOf("@@e:") == 0) { return this.findEphemera(name); } } return null; }; /** * Creates an instance of DataLegendSeriesContext */ IgxDataLegendSeriesContext.prototype.getSeriesValueInfo = function (type) { var iv = this.i.b(ensureEnum(DataLegendSeriesValueType_$type, type)); var ret = null; if (iv && iv.externalObject) { ret = iv.externalObject; } else { if (iv) { var e = new IgxDataLegendSeriesValueInfo(); e._implementation = iv; iv.externalObject = e; ret = e; } } return ret; }; /** * Gets value info for the series value type */ IgxDataLegendSeriesContext.prototype.getSeriesValue = function (type) { var iv = this.i.f(ensureEnum(DataLegendSeriesValueType_$type, type)); return (iv); }; IgxDataLegendSeriesContext.prototype.setSeriesValue = function (type, value) { this.i.k(ensureEnum(DataLegendSeriesValueType_$type, type), value); }; IgxDataLegendSeriesContext.prototype.setSeriesValueInfo = function (type, valueInfo) { this.i.l(ensureEnum(DataLegendSeriesValueType_$type, type), (valueInfo == null ? null : valueInfo.i)); }; /** * Gets all values that a series renders at the current data point * For example, Open, High, Low, Close for Financial Series */ IgxDataLegendSeriesContext.prototype.getSeriesValues = function () { var iv = this.i.a(); return (iv); }; return IgxDataLegendSeriesContext; }()); export { IgxDataLegendSeriesContext };