igniteui-angular-charts
Version:
Ignite UI Angular charting components for building rich data visualizations for modern web apps.
194 lines (191 loc) • 7.93 kB
JavaScript
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);
* ```
*/
export let IgxRangeColumnSeriesComponent = /*@__PURE__*/ (() => {
class IgxRangeColumnSeriesComponent extends IgxHorizontalRangeCategorySeriesComponent {
constructor() {
super();
}
createImplementation() {
return new RangeColumnSeries();
}
/**
* @hidden
*/
get i() {
return this._implementation;
}
/**
* Gets whether the current series shows a column shape.
*/
get isColumn() {
return this.i.e2;
}
/**
* Overridden by derived series classes to indicate when marker-less display is preferred or not.
*/
get isMarkerlessDisplayPreferred() {
return this.i.fo;
}
/**
* 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 radiusX() {
return this.i.acn;
}
set radiusX(v) {
this.i.acn = +v;
}
/**
* 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 radiusY() {
return this.i.aco;
}
set radiusY(v) {
this.i.aco = +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
*
* The `GetSeriesValueBoundingBox` method return the best available value of the bounding box within the series.
*
* ```ts
* series.getSeriesValueBoundingBox(world :IgxPoint) : IgxRect
* ```
*/
getSeriesValueBoundingBox(world) {
let iv = this.i.w7(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();
* ```
*/
getItemSpan() {
let 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(() => IgxRangeColumnSeriesComponent) }, { provide: IgxRangeCategorySeriesComponent, useExisting: forwardRef(() => IgxRangeColumnSeriesComponent) }, { provide: IgxCategorySeriesComponent, useExisting: forwardRef(() => IgxRangeColumnSeriesComponent) }, { provide: IgxMarkerSeriesComponent, useExisting: forwardRef(() => IgxRangeColumnSeriesComponent) }, { provide: IgxSeriesComponent, useExisting: forwardRef(() => IgxRangeColumnSeriesComponent) }], usesInheritance: true, ngImport: i0, template: ``, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
return 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(() => IgxRangeColumnSeriesComponent) }, { provide: IgxRangeCategorySeriesComponent, useExisting: forwardRef(() => IgxRangeColumnSeriesComponent) }, { provide: IgxCategorySeriesComponent, useExisting: forwardRef(() => IgxRangeColumnSeriesComponent) }, { provide: IgxMarkerSeriesComponent, useExisting: forwardRef(() => IgxRangeColumnSeriesComponent) }, { provide: IgxSeriesComponent, useExisting: forwardRef(() => IgxRangeColumnSeriesComponent) }],
changeDetection: ChangeDetectionStrategy.OnPush
}]
}], ctorParameters: function () { return []; }, propDecorators: { radiusX: [{
type: Input
}], radiusY: [{
type: Input
}] } });