UNPKG

igniteui-angular-charts

Version:

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

123 lines (120 loc) 6.18 kB
import { Component, forwardRef, Input, ChangeDetectionStrategy } from '@angular/core'; import { ConsolidatedItemsPosition_$type } from "./ConsolidatedItemsPosition"; import { IgxHorizontalAnchoredCategorySeriesComponent } from "./igx-horizontal-anchored-category-series-component"; import { IgxAnchoredCategorySeriesComponent } from "./igx-anchored-category-series-component"; import { IgxCategorySeriesComponent } from "./igx-category-series-component"; import { IgxMarkerSeriesComponent } from "./igx-marker-series-component"; import { IgxSeriesComponent } from "./igx-series-component"; import { ColumnSeries } from "./ColumnSeries"; import { ensureEnum, toPoint, fromRect } from "igniteui-angular-core"; import * as i0 from "@angular/core"; /** * Represents a IgxDataChartComponent column series. * Compare values across categories by using vertical rectangles. * Use it when the order of categories is not important or for displaying * item counts such as a histogram. * * ```html * <igx-data-chart [dataSource]="data" > * <igx-category-x-axis * label="label" * #xAxis> * </igx-category-x-axis> * <igx-numeric-y-axis #yAxis> * </igx-numeric-y-axis> * <igx-column-series * [xAxis]="xAxis" * [yAxis]="yAxis" * valueMemberPath="value" > * </igx-column-series> * </igx-data-chart> * ``` */ export let IgxColumnSeriesComponent = /*@__PURE__*/ (() => { class IgxColumnSeriesComponent extends IgxHorizontalAnchoredCategorySeriesComponent { constructor() { super(); } createImplementation() { return new ColumnSeries(); } /** * @hidden */ get i() { return this._implementation; } /** * Gets whether the current series shows a column shape. */ get isColumn() { return this.i.ez; } /** * Overridden by derived series classes to indicate when marker-less display is preferred or not. */ get isMarkerlessDisplayPreferred() { return this.i.fk; } /** * Gets or sets the x-radius of the ellipse that is used to round the corners of the column. */ get radiusX() { return this.i.acz; } set radiusX(v) { this.i.acz = +v; } /** * Gets or sets the y-radius of the ellipse that is used to round the corners of the column. */ get radiusY() { return this.i.ac0; } set radiusY(v) { this.i.ac0 = +v; } /** * The positioning logic to use for columns which have been consolidated into a single visual element. */ get consolidatedColumnVerticalPosition() { return this.i.acx; } set consolidatedColumnVerticalPosition(v) { this.i.acx = ensureEnum(ConsolidatedItemsPosition_$type, v); } /** * If possible, will return the best available value bounding box within the series that has the best value match for the world position provided. * @param world * The world coordinate for which to get a value bounding box for */ getSeriesValueBoundingBox(world) { let iv = this.i.wm(toPoint(world)); return fromRect(iv); } /** * For a category plotted series, returns the current width of the items within the categories. This only returns a value if the items have some form of width (e.g. columns, bars, etc.) otherwise 0 is returned. */ getItemSpan() { let iv = this.i.iv(); return (iv); } } IgxColumnSeriesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxColumnSeriesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); IgxColumnSeriesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: IgxColumnSeriesComponent, selector: "igx-column-series", inputs: { radiusX: "radiusX", radiusY: "radiusY", consolidatedColumnVerticalPosition: "consolidatedColumnVerticalPosition" }, providers: [{ provide: IgxHorizontalAnchoredCategorySeriesComponent, useExisting: forwardRef(() => IgxColumnSeriesComponent) }, { provide: IgxAnchoredCategorySeriesComponent, useExisting: forwardRef(() => IgxColumnSeriesComponent) }, { provide: IgxCategorySeriesComponent, useExisting: forwardRef(() => IgxColumnSeriesComponent) }, { provide: IgxMarkerSeriesComponent, useExisting: forwardRef(() => IgxColumnSeriesComponent) }, { provide: IgxSeriesComponent, useExisting: forwardRef(() => IgxColumnSeriesComponent) }], usesInheritance: true, ngImport: i0, template: ``, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); return IgxColumnSeriesComponent; })(); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxColumnSeriesComponent, decorators: [{ type: Component, args: [{ selector: 'igx-column-series', template: ``, providers: [{ provide: IgxHorizontalAnchoredCategorySeriesComponent, useExisting: forwardRef(() => IgxColumnSeriesComponent) }, { provide: IgxAnchoredCategorySeriesComponent, useExisting: forwardRef(() => IgxColumnSeriesComponent) }, { provide: IgxCategorySeriesComponent, useExisting: forwardRef(() => IgxColumnSeriesComponent) }, { provide: IgxMarkerSeriesComponent, useExisting: forwardRef(() => IgxColumnSeriesComponent) }, { provide: IgxSeriesComponent, useExisting: forwardRef(() => IgxColumnSeriesComponent) }], changeDetection: ChangeDetectionStrategy.OnPush }] }], ctorParameters: function () { return []; }, propDecorators: { radiusX: [{ type: Input }], radiusY: [{ type: Input }], consolidatedColumnVerticalPosition: [{ type: Input }] } });