UNPKG

igniteui-angular-charts

Version:

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

143 lines (138 loc) 5.29 kB
import { Component, Input } from '@angular/core'; import { IgxCategoryAxisBaseComponent } from "./igx-category-axis-base-component"; import { IgxNumericYAxisComponent } from "./igx-numeric-y-axis-component"; import { IgxStackedSeriesBaseComponent } from "./igx-stacked-series-base-component"; import * as i0 from "@angular/core"; /** * Base class for stacked series with a category x-axis and a numeric y-axis. */ export let IgxHorizontalStackedSeriesBaseComponent = /*@__PURE__*/ (() => { class IgxHorizontalStackedSeriesBaseComponent extends IgxStackedSeriesBaseComponent { constructor() { super(); } /** * @hidden */ get i() { return this._implementation; } /** * Gets or sets the effective x-axis for this series. */ get xAxis() { const r = this.i.xAxis; if (r == null) { return null; } if (!r.externalObject) { let e = IgxCategoryAxisBaseComponent._createFromInternal(r); if (e) { e._implementation = r; } r.externalObject = e; } return r.externalObject; } set xAxis(v) { if (v != null && this._stylingContainer && v._styling) v._styling(this._stylingContainer, this, this); v == null ? this.i.xAxis = null : this.i.xAxis = v.i; } get hasValueAxis() { return this.i.em; } get isValueAxisInverted() { return this.i.gb; } /** * Gets or sets the effective y-axis for this series. */ get yAxis() { const r = this.i.yAxis; if (r == null) { return null; } if (!r.externalObject) { let e = IgxNumericYAxisComponent._createFromInternal(r); if (e) { e._implementation = r; } r.externalObject = e; } return r.externalObject; } set yAxis(v) { if (v != null && this._stylingContainer && v._styling) v._styling(this._stylingContainer, this, this); v == null ? this.i.yAxis = null : this.i.yAxis = v.i; } findByName(name) { var baseResult = super.findByName(name); if (baseResult) { return baseResult; } if (this.xAxis && this.xAxis.name && this.xAxis.name == name) { return this.xAxis; } if (this.yAxis && this.yAxis.name && this.yAxis.name == name) { return this.yAxis; } return null; } _styling(container, component, parent) { super._styling(container, component, parent); this._inStyling = true; if (this.xAxis && this.xAxis._styling) { this.xAxis._styling(container, component, this); } if (this.yAxis && this.yAxis._styling) { this.yAxis._styling(container, component, this); } this._inStyling = false; } /** * Returns the offset value for this series if grouped on a category axis. */ getOffsetValue() { let iv = this.i.getOffsetValue(); return (iv); } /** * Returns the width of the category grouping this series is in. */ getCategoryWidth() { let iv = this.i.getCategoryWidth(); return (iv); } /** * Determine if object can be used as YAxis * @param axis * The object to check */ canUseAsYAxis(axis) { let iv = this.i.acj(axis); return (iv); } /** * Determine if object can be used as XAxis * @param axis * The object to check */ canUseAsXAxis(axis) { let iv = this.i.aci(axis); return (iv); } } IgxHorizontalStackedSeriesBaseComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxHorizontalStackedSeriesBaseComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); IgxHorizontalStackedSeriesBaseComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: IgxHorizontalStackedSeriesBaseComponent, selector: "ng-component", inputs: { xAxis: "xAxis", yAxis: "yAxis" }, usesInheritance: true, ngImport: i0, template: ``, isInline: true }); return IgxHorizontalStackedSeriesBaseComponent; })(); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxHorizontalStackedSeriesBaseComponent, decorators: [{ type: Component, args: [{ template: ``, }] }], ctorParameters: function () { return []; }, propDecorators: { xAxis: [{ type: Input }], yAxis: [{ type: Input }] } });