UNPKG

igniteui-angular-charts

Version:

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

156 lines (153 loc) 4.43 kB
import { IgxRingSeriesBaseComponent } from "./igx-ring-series-base-component"; import { Ring as Ring_internal } from "./Ring"; import { toSize, fromSize, fromPoint, toPoint } from "igniteui-angular-core"; /** * Represents data for * Ring.RingControl element. */ var IgxRing = /** @class */ /*@__PURE__*/ (function () { function IgxRing() { this._implementation = this.createImplementation(); this._implementation.externalObject = this; this.onImplementationCreated(); if (this._initializeAdapters) { this._initializeAdapters(); } } IgxRing.prototype.createImplementation = function () { return new Ring_internal(); }; Object.defineProperty(IgxRing.prototype, "i", { /** * @hidden */ get: function () { return this._implementation; }, enumerable: false, configurable: true }); IgxRing.prototype.onImplementationCreated = function () { }; IgxRing.prototype._provideImplementation = function (i) { this._implementation = i; this._implementation.externalObject = this; this.onImplementationCreated(); }; Object.defineProperty(IgxRing.prototype, "index", { /** * Gets the index of ring in the chart. */ get: function () { return this.i.j; }, set: function (v) { this.i.j = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgxRing.prototype, "innerExtend", { /** * Gets the inner extend of the ring in percentage. */ get: function () { return this.i.h; }, set: function (v) { this.i.h = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgxRing.prototype, "controlSize", { /** * Gets the size of the ring. */ get: function () { return fromSize(this.i.q); }, set: function (v) { this.i.q = toSize(v); }, enumerable: false, configurable: true }); Object.defineProperty(IgxRing.prototype, "center", { /** * Gets the center point of the ring. */ get: function () { return fromPoint(this.i.p); }, set: function (v) { this.i.p = toPoint(v); }, enumerable: false, configurable: true }); Object.defineProperty(IgxRing.prototype, "ringSeries", { /** * Gets reference to ring series. */ get: function () { var r = this.i.c; if (r == null) { return null; } if (!r.externalObject) { var e = IgxRingSeriesBaseComponent._createFromInternal(r); if (e) { e._implementation = 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 }); Object.defineProperty(IgxRing.prototype, "ringBreadth", { /** * Gets the ring breadth. */ get: function () { return this.i.i; }, set: function (v) { this.i.i = +v; }, enumerable: false, configurable: true }); IgxRing.prototype.findByName = function (name) { if (this.findEphemera) { if (name && name.indexOf("@@e:") == 0) { return this.findEphemera(name); } } if (this.ringSeries && this.ringSeries.name && this.ringSeries.name == name) { return this.ringSeries; } return null; }; /** * Renders the arcs. */ IgxRing.prototype.renderArcs = function () { var iv = this.i.f(); return (iv); }; /** * Prepares data needed to create * Arcs. */ IgxRing.prototype.prepareArcs = function () { this.i.o(); }; return IgxRing; }()); export { IgxRing };