UNPKG

igniteui-angular-charts

Version:

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

249 lines (241 loc) 8.61 kB
import { Component, Input } from '@angular/core'; import { IgxNumericXAxisComponent } from "./igx-numeric-x-axis-component"; import { IgxCategoryAxisBaseComponent } from "./igx-category-axis-base-component"; import { IgxRangeCategorySeriesComponent } from "./igx-range-category-series-component"; import { toPoint, fromPoint } from "igniteui-angular-core"; import * as i0_1 from "@angular/core"; /** * Base class for ranged category series with a numeric X-axis and a category Y-axis. */ export class IgxVerticalRangeCategorySeriesComponent extends IgxRangeCategorySeriesComponent { /** * @hidden */ get i() { return this._implementation; } constructor() { super(); } /** * Gets or sets the effective x-axis for the current CategorySeries object. */ get xAxis() { const r = this.i.xAxis; if (r == null) { return null; } if (!r.externalObject) { let e = IgxNumericXAxisComponent._createFromInternal(r); if (e) { e._implementation = r; } Object.defineProperty(r, 'externalObject', { value: e, enumerable: false, configurable: true, writable: true }); } 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 effective y-axis for the current CategorySeries object. */ get yAxis() { const r = this.i.yAxis; if (r == null) { return null; } if (!r.externalObject) { let e = IgxCategoryAxisBaseComponent._createFromInternal(r); if (e) { e._implementation = r; } Object.defineProperty(r, 'externalObject', { value: e, enumerable: false, configurable: true, writable: true }); } 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 whether or not the current series is vertical series */ get isVertical() { return this.i.isVertical; } /** * Checks if this series is a range series */ get isRange() { return this.i.fy; } /** * Gets or sets the label displayed before series' Low value in the Data Legend. */ get lowMemberAsLegendLabel() { return this.i.ac5; } set lowMemberAsLegendLabel(v) { this.i.ac5 = v; } /** * Gets or sets the label displayed before series' High value in the Data Legend. */ get highMemberAsLegendLabel() { return this.i.ac1; } set highMemberAsLegendLabel(v) { this.i.ac1 = v; } /** * Gets or sets the unit displayed after series' Low value in the Data Legend. */ get lowMemberAsLegendUnit() { return this.i.ac7; } set lowMemberAsLegendUnit(v) { this.i.ac7 = v; } /** * Gets or sets the unit displayed after series' High value in the Data Legend. */ get highMemberAsLegendUnit() { return this.i.ac3; } set highMemberAsLegendUnit(v) { this.i.ac3 = v; } 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); } /** * Gets the precise item index using the vertical (Y-based) category axis. * The base implementation uses the horizontal interaction manager which reads world.X; * vertical series must read world.Y instead. */ getExactItemIndex(world) { let iv = this.i.i0(toPoint(world)); return (iv); } /** * Gets the index of the item that resides at the provided world coordinates (vertical orientation). */ getItemIndex(world) { let iv = this.i.ke(toPoint(world)); return (iv); } /** * Gets the item that is the best match for the specified world coordinates (vertical orientation). */ getItem(world) { let iv = this.i.ky(toPoint(world)); return (iv); } getNextOrExactIndex(world, skipUnknowns) { let iv = this.i.kj(toPoint(world), skipUnknowns); return (iv); } getPreviousOrExactIndex(world, skipUnknowns) { let iv = this.i.kl(toPoint(world), skipUnknowns); return (iv); } getSeriesValue(world, useInterpolation, skipUnknowns) { let iv = this.i.jf(toPoint(world), useInterpolation, skipUnknowns); return (iv); } getSeriesLowValue(world, useInterpolation, skipUnknowns) { let iv = this.i.jd(toPoint(world), useInterpolation, skipUnknowns); return (iv); } getSeriesHighValue(world, useInterpolation, skipUnknowns) { let iv = this.i.jb(toPoint(world), useInterpolation, skipUnknowns); return (iv); } getSeriesHighValuePosition(world, useInterpolation, skipUnknowns) { let iv = this.i.wu(toPoint(world), useInterpolation, skipUnknowns); return fromPoint(iv); } getSeriesLowValuePosition(world, useInterpolation, skipUnknowns) { let iv = this.i.ww(toPoint(world), useInterpolation, skipUnknowns); return fromPoint(iv); } getSeriesValuePosition(world, useInterpolation, skipUnknowns) { let iv = this.i.wy(toPoint(world), useInterpolation, skipUnknowns); return fromPoint(iv); } /** * Determine if object can be used as YAxis * @param axis * The object to check */ canUseAsYAxis(axis) { let iv = this.i.ac0(axis); return (iv); } /** * Determine if object can be used as XAxis * @param axis * The object to check */ canUseAsXAxis(axis) { let iv = this.i.acz(axis); return (iv); } static { this.ɵfac = i0_1.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0-rc.1", ngImport: i0_1, type: IgxVerticalRangeCategorySeriesComponent, deps: [], target: i0_1.ɵɵFactoryTarget.Component }); } static { this.ɵcmp = i0_1.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.0-rc.1", type: IgxVerticalRangeCategorySeriesComponent, isStandalone: true, selector: "ng-component", inputs: { xAxis: "xAxis", yAxis: "yAxis", lowMemberAsLegendLabel: "lowMemberAsLegendLabel", highMemberAsLegendLabel: "highMemberAsLegendLabel", lowMemberAsLegendUnit: "lowMemberAsLegendUnit", highMemberAsLegendUnit: "highMemberAsLegendUnit" }, usesInheritance: true, ngImport: i0_1, template: ``, isInline: true }); } } i0_1.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0-rc.1", ngImport: i0_1, type: IgxVerticalRangeCategorySeriesComponent, decorators: [{ type: Component, args: [{ template: ``, }] }], ctorParameters: () => [], propDecorators: { xAxis: [{ type: Input }], yAxis: [{ type: Input }], lowMemberAsLegendLabel: [{ type: Input }], highMemberAsLegendLabel: [{ type: Input }], lowMemberAsLegendUnit: [{ type: Input }], highMemberAsLegendUnit: [{ type: Input }] } });