igniteui-angular-charts
Version:
Ignite UI Angular charting components for building rich data visualizations for modern web apps.
71 lines (70 loc) • 5.82 kB
JavaScript
import { __extends } from "tslib";
import { Component, forwardRef, ChangeDetectionStrategy } from '@angular/core';
import { IgxLegendBaseComponent } from './igx-legend-base-component';
import { Legend } from "./Legend";
import { AngularRenderer } from "igniteui-angular-core";
import { DataChartStylingDefaults } from './DataChartStylingDefaults';
import * as i0 from "@angular/core";
/**
* Represents a legend that displays information about each series, most often used in financial charting.
*/
var IgxFinancialLegendComponent = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(IgxFinancialLegendComponent, _super);
function IgxFinancialLegendComponent(renderer, elRef, ngZone) {
var _this = _super.call(this) || this;
_this.renderer = renderer;
_this.elRef = elRef;
_this.ngZone = ngZone;
_this._zoneRunner = function (act) { return _this.ngZone.run(act); };
_this.container = renderer.createElement("div");
renderer.appendChild(elRef.nativeElement, _this.container);
var root;
root = _this.container;
if (_this.container != null) {
root = _this.container;
}
var ren = new AngularRenderer(root, _this.renderer, window.document, _this.ngZone, true, DataChartStylingDefaults);
_this._wrapper = ren;
_this.i.provideContainer(ren);
return _this;
}
IgxFinancialLegendComponent.prototype.ngOnDestroy = function () {
this._wrapper.destroy();
this.i.provideContainer(null);
};
IgxFinancialLegendComponent.prototype.createImplementation = function () {
return new Legend();
};
Object.defineProperty(IgxFinancialLegendComponent.prototype, "i", {
get: function () {
return this._implementation;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxFinancialLegendComponent.prototype, "isFinancial", {
/**
* Gets if the legend is a financial legend.
*/
get: function () {
return this.i.isFinancial;
},
enumerable: false,
configurable: true
});
IgxFinancialLegendComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxFinancialLegendComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
IgxFinancialLegendComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: IgxFinancialLegendComponent, selector: "igx-financial-legend", host: { classAttribute: "ig-financial-legend igx-financial-legend" }, providers: [{ provide: IgxLegendBaseComponent, useExisting: forwardRef(function () { return IgxFinancialLegendComponent; }) }], usesInheritance: true, ngImport: i0, template: "", isInline: true, styles: [":host {\n display: block;\n}\n.ig-legend {\n border: none;\n border: var(--legend-border, none);\n overflow: auto;\n overflow: var(--legend-item-overflow, auto);\n}\n.ig-chart-legend-item-text {\n font: 12px Verdana, Arial, sans-serif;\n font: var(--legend-item-font, 12px Verdana, Arial, sans-serif);\n vertical-align: middle;\n vertical-align: var(--legend-item-vertical-align, middle);\n}\n.ig-chart-legend-items-list\n{\n padding: 5px;\n padding: var(--legend-item-padding, 5px);\n margin: 0px;\n margin: var(--legend-item-margin, 0px);\n background-color: transparent;\n background-color: var(--legend-list-background-color, transparent);\n}\n.ig-chart-legend-item-badge, .ui-chart-legend-item-badge canvas\n{\n vertical-align: middle;\n vertical-align: var(--legend-item-badge-vertical-align, middle);\n}\n.ig-chart-legend-item\n{\n background-color: transparent;\n background-color: var(--legend-item-background-color, transparent);\n}"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
return IgxFinancialLegendComponent;
}(IgxLegendBaseComponent));
export { IgxFinancialLegendComponent };
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxFinancialLegendComponent, decorators: [{
type: Component,
args: [{
selector: 'igx-financial-legend',
template: "",
providers: [{ provide: IgxLegendBaseComponent, useExisting: forwardRef(function () { return IgxFinancialLegendComponent; }) }],
host: { 'class': 'ig-financial-legend igx-financial-legend' },
changeDetection: ChangeDetectionStrategy.OnPush,
styles: [":host {\n display: block;\n}\n.ig-legend {\n border: none;\n border: var(--legend-border, none);\n overflow: auto;\n overflow: var(--legend-item-overflow, auto);\n}\n.ig-chart-legend-item-text {\n font: 12px Verdana, Arial, sans-serif;\n font: var(--legend-item-font, 12px Verdana, Arial, sans-serif);\n vertical-align: middle;\n vertical-align: var(--legend-item-vertical-align, middle);\n}\n.ig-chart-legend-items-list\n{\n padding: 5px;\n padding: var(--legend-item-padding, 5px);\n margin: 0px;\n margin: var(--legend-item-margin, 0px);\n background-color: transparent;\n background-color: var(--legend-list-background-color, transparent);\n}\n.ig-chart-legend-item-badge, .ui-chart-legend-item-badge canvas\n{\n vertical-align: middle;\n vertical-align: var(--legend-item-badge-vertical-align, middle);\n}\n.ig-chart-legend-item\n{\n background-color: transparent;\n background-color: var(--legend-item-background-color, transparent);\n}"]
}]
}], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i0.NgZone }]; } });