UNPKG

igniteui-angular-charts

Version:

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

51 lines (50 loc) 4.94 kB
import { Component, Renderer2, ElementRef, forwardRef, NgZone, 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. */ export class IgxFinancialLegendComponent extends IgxLegendBaseComponent { constructor(renderer, elRef, ngZone) { super(); this.renderer = renderer; this.elRef = elRef; this.ngZone = ngZone; this._zoneRunner = (act) => 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); } ngOnDestroy() { this._wrapper.destroy(); this.i.provideContainer(null); } createImplementation() { return new Legend(); } get i() { return this._implementation; } /** * Gets if the legend is a financial legend. */ get isFinancial() { return this.i.isFinancial; } static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0-rc.1", ngImport: i0, type: IgxFinancialLegendComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component }); } static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.0-rc.1", type: IgxFinancialLegendComponent, isStandalone: true, selector: "igx-financial-legend", host: { classAttribute: "ig-financial-legend igx-financial-legend" }, providers: [{ provide: IgxLegendBaseComponent, useExisting: forwardRef(() => 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 }); } } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0-rc.1", ngImport: i0, type: IgxFinancialLegendComponent, decorators: [{ type: Component, args: [{ selector: 'igx-financial-legend', template: ``, providers: [{ provide: IgxLegendBaseComponent, useExisting: forwardRef(() => 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: () => [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i0.NgZone }] });