UNPKG

igniteui-angular-charts

Version:

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

89 lines (86 loc) 4.65 kB
import { Component, forwardRef, Input, ChangeDetectionStrategy } from '@angular/core'; import { IgxVerticalRangeCategorySeriesComponent } from "./igx-vertical-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 { RangeBarSeries } from "./RangeBarSeries"; import { toPoint, fromRect } from "igniteui-angular-core"; import * as i0 from "@angular/core"; /** * Represents a IgxDataChartComponent range bar series. */ export class IgxRangeBarSeriesComponent extends IgxVerticalRangeCategorySeriesComponent { createImplementation() { return new RangeBarSeries(); } /** * @hidden */ get i() { return this._implementation; } constructor() { super(); } /** * Gets whether the current series shows a bar shape. */ get isBar() { return this.i.e0; } /** * Overridden by derived series classes to indicate when marker-less display is preferred or not. */ get isMarkerlessDisplayPreferred() { return this.i.fp; } /** * Gets or sets the x-radius of the ellipse that is used to round the corners of the bar. */ get radiusX() { return this.i.adi; } set radiusX(v) { this.i.adi = +v; } /** * Gets or sets the y-radius of the ellipse that is used to round the corners of the bar. */ get radiusY() { return this.i.adj; } set radiusY(v) { this.i.adj = +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.xa(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.i5(); return (iv); } static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0-rc.1", ngImport: i0, type: IgxRangeBarSeriesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); } static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.0-rc.1", type: IgxRangeBarSeriesComponent, isStandalone: true, selector: "igx-range-bar-series", inputs: { radiusX: "radiusX", radiusY: "radiusY" }, providers: [{ provide: IgxVerticalRangeCategorySeriesComponent, useExisting: forwardRef(() => IgxRangeBarSeriesComponent) }, { provide: IgxRangeCategorySeriesComponent, useExisting: forwardRef(() => IgxRangeBarSeriesComponent) }, { provide: IgxCategorySeriesComponent, useExisting: forwardRef(() => IgxRangeBarSeriesComponent) }, { provide: IgxMarkerSeriesComponent, useExisting: forwardRef(() => IgxRangeBarSeriesComponent) }, { provide: IgxSeriesComponent, useExisting: forwardRef(() => IgxRangeBarSeriesComponent) }], usesInheritance: true, ngImport: i0, template: ``, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); } } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0-rc.1", ngImport: i0, type: IgxRangeBarSeriesComponent, decorators: [{ type: Component, args: [{ selector: 'igx-range-bar-series', template: ``, providers: [{ provide: IgxVerticalRangeCategorySeriesComponent, useExisting: forwardRef(() => IgxRangeBarSeriesComponent) }, { provide: IgxRangeCategorySeriesComponent, useExisting: forwardRef(() => IgxRangeBarSeriesComponent) }, { provide: IgxCategorySeriesComponent, useExisting: forwardRef(() => IgxRangeBarSeriesComponent) }, { provide: IgxMarkerSeriesComponent, useExisting: forwardRef(() => IgxRangeBarSeriesComponent) }, { provide: IgxSeriesComponent, useExisting: forwardRef(() => IgxRangeBarSeriesComponent) }], changeDetection: ChangeDetectionStrategy.OnPush }] }], ctorParameters: () => [], propDecorators: { radiusX: [{ type: Input }], radiusY: [{ type: Input }] } });