UNPKG

igniteui-webcomponents-charts

Version:

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

197 lines (192 loc) 6.85 kB
import { IgcCategoryAxisBaseComponent } from "./igc-category-axis-base-component"; import { IgcNumericYAxisComponent } from "./igc-numeric-y-axis-component"; import { IgcStackedSeriesBaseComponent } from "./igc-stacked-series-base-component"; import { getAllPropertyNames, toSpinal } from "igniteui-webcomponents-core"; let IgcHorizontalStackedSeriesBaseComponent = /*@__PURE__*/ (() => { class IgcHorizontalStackedSeriesBaseComponent extends IgcStackedSeriesBaseComponent { /** * @hidden */ get i() { return this._implementation; } constructor() { super(); this._xAxisName = null; this._yAxisName = null; } connectedCallback() { if (super["connectedCallback"]) { super["connectedCallback"](); } if (this.i.connectedCallback) { this.i.connectedCallback(); } if (!this._attached) { this._attached = true; this._flushQueuedAttributes(); } } disconnectedCallback() { if (super["disconnectedCallback"]) { super["disconnectedCallback"](); } if (this.i.disconnectedCallback) { this.i.disconnectedCallback(); } if (this._attached) { this._attached = false; } } static get observedAttributes() { if (IgcHorizontalStackedSeriesBaseComponent._observedAttributesIgcHorizontalStackedSeriesBaseComponent == null) { let names = getAllPropertyNames(IgcHorizontalStackedSeriesBaseComponent); for (let i = 0; i < names.length; i++) { names[i] = toSpinal(names[i]); } IgcHorizontalStackedSeriesBaseComponent._observedAttributesIgcHorizontalStackedSeriesBaseComponent = names; } return IgcHorizontalStackedSeriesBaseComponent._observedAttributesIgcHorizontalStackedSeriesBaseComponent; } /** * 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 = IgcCategoryAxisBaseComponent._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; } /** * Gets or sets the name to use to resolve xAxis from markup. */ get xAxisName() { return this._xAxisName; } set xAxisName(v) { this._xAxisName = v; } 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 = IgcNumericYAxisComponent._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; } /** * Gets or sets the name to use to resolve yAxis from markup. */ get yAxisName() { return this._yAxisName; } set yAxisName(v) { this._yAxisName = v; } bindAxes(axes) { super.bindAxes(axes); for (let i = 0; i < axes.length; i++) { if (this.xAxisName && this.xAxisName.length > 0 && axes[i].name == this.xAxisName) { this.xAxis = axes[i]; } } for (let i = 0; i < axes.length; i++) { if (this.yAxisName && this.yAxisName.length > 0 && axes[i].name == this.yAxisName) { this.yAxis = axes[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.ack(axis); return (iv); } /** * Determine if object can be used as XAxis * @param axis * The object to check */ canUseAsXAxis(axis) { let iv = this.i.acj(axis); return (iv); } } IgcHorizontalStackedSeriesBaseComponent._observedAttributesIgcHorizontalStackedSeriesBaseComponent = null; return IgcHorizontalStackedSeriesBaseComponent; })(); export { IgcHorizontalStackedSeriesBaseComponent };