UNPKG

igniteui-angular-charts

Version:

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

215 lines (212 loc) 9.01 kB
import { __extends } from "tslib"; import { Component, forwardRef, Input, ChangeDetectionStrategy } from '@angular/core'; import { IgxHorizontalRangeCategorySeriesComponent } from "./igx-horizontal-range-category-series-component"; import { IgxRangeCategorySeriesComponent } from "./igx-range-category-series-component"; import { IgxCategorySeriesComponent } from "./igx-category-series-component"; import { IgxMarkerSeriesComponent } from "./igx-marker-series-component"; import { IgxSeriesComponent } from "./igx-series-component"; import { RangeColumnSeries } from "./RangeColumnSeries"; import { toPoint, fromRect } from "igniteui-angular-core"; import * as i0 from "@angular/core"; /** * Represents a IgxDataChartComponent range column series. * * The `RangeColumnSeries` class represents range column series of the IgxDataChartComponent. * * ```html * <igx-data-chart #chart * [dataSource]="data"> * <igx-category-x-axis * label="label" * #xAxis> * </igx-category-x-axis> * <igx-numeric-y-axis * minimumValue="0" * #yAxis> * </igx-numeric-y-axis> * <igx-range-column-series * [xAxis]="xAxis" * [yAxis]="yAxis" * highMemberPath="high" * lowMemberPath="low"> * </igx-range-column-series> * </igx-data-chart> * ``` * * ```ts * let series = new IgxRangeColumnSeriesComponent(); * series.xAxis = this.xAxis; * series.yAxis = this.yAxis; * series.highMemberPath = "high"; * series.lowMemberPath = "low"; * this.chart.series.add(series); * ``` */ var IgxRangeColumnSeriesComponent = /** @class */ /*@__PURE__*/ (function (_super) { __extends(IgxRangeColumnSeriesComponent, _super); function IgxRangeColumnSeriesComponent() { return _super.call(this) || this; } IgxRangeColumnSeriesComponent.prototype.createImplementation = function () { return new RangeColumnSeries(); }; Object.defineProperty(IgxRangeColumnSeriesComponent.prototype, "i", { /** * @hidden */ get: function () { return this._implementation; }, enumerable: false, configurable: true }); Object.defineProperty(IgxRangeColumnSeriesComponent.prototype, "isColumn", { /** * Gets whether the current series shows a column shape. */ get: function () { return this.i.e2; }, enumerable: false, configurable: true }); Object.defineProperty(IgxRangeColumnSeriesComponent.prototype, "isMarkerlessDisplayPreferred", { /** * Overridden by derived series classes to indicate when marker-less display is preferred or not. */ get: function () { return this.i.fo; }, enumerable: false, configurable: true }); Object.defineProperty(IgxRangeColumnSeriesComponent.prototype, "radiusX", { /** * Gets or sets the x-radius of the ellipse that is used to round the corners of the column. * * Use the `RadiusX` property to round the corners of the column. * * ```html * <igx-data-chart #chart * [dataSource]="data" * > * <igx-category-x-axis * label="label" * #xAxis * > * </igx-category-x-axis> * <igx-numeric-y-axis * minimumValue="0" * #yAxis> * </igx-numeric-y-axis> * <igx-range-column-series * [xAxis]="xAxis" * [yAxis]="yAxis" * highMemberPath="high" * lowMemberPath="low" * radiusX="10"> * </igx-range-column-series> * </igx-data-chart> * ``` * * ```ts * series.radiusX=10; * ``` */ get: function () { return this.i.aco; }, set: function (v) { this.i.aco = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgxRangeColumnSeriesComponent.prototype, "radiusY", { /** * Gets or sets the y-radius of the ellipse that is used to round the corners of the column. * * Use the `RadiusY` property for the y-radius of the ellipse that is used to round the corners of the column. * * ```html * <igx-data-chart #chart * [dataSource]="data" * > * <igx-category-x-axis * label="label" * #xAxis * > * </igx-category-x-axis> * <igx-numeric-y-axis * minimumValue="0" * #yAxis> * </igx-numeric-y-axis> * <igx-range-column-series * * [xAxis]="xAxis" * [yAxis]="yAxis" * highMemberPath="high" * lowMemberPath="low" * radiusY= "10"> * </igx-range-column-series> * </igx-data-chart> * ``` * * ```ts * series.radiusY=10; * ``` */ get: function () { return this.i.acp; }, set: function (v) { this.i.acp = +v; }, enumerable: false, configurable: true }); /** * 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 * * The `GetSeriesValueBoundingBox` method return the best available value of the bounding box within the series. * * ```ts * series.getSeriesValueBoundingBox(world :IgxPoint) : IgxRect * ``` */ IgxRangeColumnSeriesComponent.prototype.getSeriesValueBoundingBox = function (world) { var iv = this.i.w8(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. * * The `GetItemSpan` method returns the current width of the items within the categories. * * ```ts * var x =series.getItemSpan(); * ``` */ IgxRangeColumnSeriesComponent.prototype.getItemSpan = function () { var iv = this.i.i3(); return (iv); }; IgxRangeColumnSeriesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxRangeColumnSeriesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); IgxRangeColumnSeriesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: IgxRangeColumnSeriesComponent, selector: "igx-range-column-series", inputs: { radiusX: "radiusX", radiusY: "radiusY" }, providers: [{ provide: IgxHorizontalRangeCategorySeriesComponent, useExisting: forwardRef(function () { return IgxRangeColumnSeriesComponent; }) }, { provide: IgxRangeCategorySeriesComponent, useExisting: forwardRef(function () { return IgxRangeColumnSeriesComponent; }) }, { provide: IgxCategorySeriesComponent, useExisting: forwardRef(function () { return IgxRangeColumnSeriesComponent; }) }, { provide: IgxMarkerSeriesComponent, useExisting: forwardRef(function () { return IgxRangeColumnSeriesComponent; }) }, { provide: IgxSeriesComponent, useExisting: forwardRef(function () { return IgxRangeColumnSeriesComponent; }) }], usesInheritance: true, ngImport: i0, template: "", isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); return IgxRangeColumnSeriesComponent; }(IgxHorizontalRangeCategorySeriesComponent)); export { IgxRangeColumnSeriesComponent }; i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxRangeColumnSeriesComponent, decorators: [{ type: Component, args: [{ selector: 'igx-range-column-series', template: "", providers: [{ provide: IgxHorizontalRangeCategorySeriesComponent, useExisting: forwardRef(function () { return IgxRangeColumnSeriesComponent; }) }, { provide: IgxRangeCategorySeriesComponent, useExisting: forwardRef(function () { return IgxRangeColumnSeriesComponent; }) }, { provide: IgxCategorySeriesComponent, useExisting: forwardRef(function () { return IgxRangeColumnSeriesComponent; }) }, { provide: IgxMarkerSeriesComponent, useExisting: forwardRef(function () { return IgxRangeColumnSeriesComponent; }) }, { provide: IgxSeriesComponent, useExisting: forwardRef(function () { return IgxRangeColumnSeriesComponent; }) }], changeDetection: ChangeDetectionStrategy.OnPush }] }], ctorParameters: function () { return []; }, propDecorators: { radiusX: [{ type: Input }], radiusY: [{ type: Input }] } });