UNPKG

igniteui-webcomponents-charts

Version:

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

109 lines (108 loc) 4.48 kB
import { __extends } from "tslib"; import { IgcLegendBaseComponent } from './igc-legend-base-component'; import { Legend } from "./Legend"; import { WebComponentRenderer } from "igniteui-webcomponents-core"; import { DataChartStylingDefaults } from './DataChartStylingDefaults'; import { toSpinal, getAllPropertyNames } from "igniteui-webcomponents-core"; import { RegisterElementHelper } from "igniteui-webcomponents-core"; /** * Represents a legend that displays information about each series, most often used in financial charting. */ var IgcFinancialLegendComponent = /** @class */ /*@__PURE__*/ (function (_super) { __extends(IgcFinancialLegendComponent, _super); function IgcFinancialLegendComponent() { var _this = _super.call(this) || this; _this._disconnected = false; var container; if (document) { container = document.createElement("div"); container.style.display = "block"; container.style.width = "100%"; container.style.height = "100%"; } var root; root = container; var ren = new WebComponentRenderer(root, document, true, DataChartStylingDefaults); _this.container = ren.getWrapper(container); _this._wrapper = ren; _this.i.provideContainer(ren); return _this; } IgcFinancialLegendComponent.prototype.initializeContent = function () { }; IgcFinancialLegendComponent.prototype.destroy = function () { this._wrapper.destroy(); this.i.provideContainer(null); }; IgcFinancialLegendComponent.prototype.createImplementation = function () { return new Legend(); }; Object.defineProperty(IgcFinancialLegendComponent.prototype, "i", { get: function () { return this._implementation; }, enumerable: false, configurable: true }); IgcFinancialLegendComponent.prototype.disconnectedCallback = function () { this._disconnected = true; if (this.i) { this.i.onDetachedFromUI(); } }; IgcFinancialLegendComponent.prototype.connectedCallback = function () { if (this._disconnected) { this._disconnected = false; if (this.i) { this.i.onAttachedToUI(); } return; } this.classList.add("ig-item-legend"); this.classList.add("igc-item-legend"); this.appendChild(this._wrapper.rootWrapper.getNativeElement()); this._attached = true; this.style.display = "block"; //this.style.height = this._height; //this.style.width = this._width; this._flushQueuedAttributes(); // supports themes or custom properties set in CSS //this._styling(this, this); this.initializeContent(); }; Object.defineProperty(IgcFinancialLegendComponent, "observedAttributes", { get: function () { if (IgcFinancialLegendComponent._observedAttributesIgcFinancialLegendComponent == null) { var names = getAllPropertyNames(IgcFinancialLegendComponent); for (var i = 0; i < names.length; i++) { names[i] = toSpinal(names[i]); } IgcFinancialLegendComponent._observedAttributesIgcFinancialLegendComponent = names; } return IgcFinancialLegendComponent._observedAttributesIgcFinancialLegendComponent; }, enumerable: false, configurable: true }); IgcFinancialLegendComponent.register = function () { if (!IgcFinancialLegendComponent._isElementRegistered) { IgcFinancialLegendComponent._isElementRegistered = true; RegisterElementHelper.registerElement(IgcFinancialLegendComponent.htmlTagName, IgcFinancialLegendComponent); } }; Object.defineProperty(IgcFinancialLegendComponent.prototype, "isFinancial", { /** * Gets if the legend is a financial legend. */ get: function () { return this.i.isFinancial; }, enumerable: false, configurable: true }); IgcFinancialLegendComponent._observedAttributesIgcFinancialLegendComponent = null; IgcFinancialLegendComponent.htmlTagName = "igc-financial-legend"; IgcFinancialLegendComponent._isElementRegistered = false; return IgcFinancialLegendComponent; }(IgcLegendBaseComponent)); export { IgcFinancialLegendComponent };